diff --git a/apps/keira/src/assets/i18n/en.json b/apps/keira/src/assets/i18n/en.json index 8082ea9d4d..f660cc6d09 100644 --- a/apps/keira/src/assets/i18n/en.json +++ b/apps/keira/src/assets/i18n/en.json @@ -683,7 +683,8 @@ "CONDITION_PET_TYPE": "mask", "CONDITION_TAXI": "Always 0", "CONDITION_QUESTSTATE": "quest_template.ID", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "quest_template.id", + "CONDITION_WORLD_SCRIPT": "WorldStateCondition (defined in WorldState.h)" }, "VALUE2": { "CONDITION_NONE": "(Never used)", @@ -703,7 +704,8 @@ "CONDITION_HP_PCT": "ComparisionType: 0 = Percentage of max HP must be equal; 1 = Percentage of max HP must be higher; 2 = Percentage of max HP must be lower; 3 = Percentage of max HP must be equal or higher; 4 = Percentage of max HP must be equal or lower", "CONDITION_STAND_STATE": "Exact stand state, or generic state (stand/sit), depending on value 10 = Standing; 1 = Sitting", "CONDITION_QUESTSTATE": "state_mask", - "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo" + "CONDITION_QUEST_OBJECTIVE_PROGRESS": "Quest Objective ID - see quest_template.RequiredNpcOrGo", + "CONDITION_WORLD_SCRIPT": "state, 0 = unused" }, "VALUE3": { "CONDITION_NONE": "(Never used)", diff --git a/libs/features/conditions/src/edit-conditions/conditions-constants.ts b/libs/features/conditions/src/edit-conditions/conditions-constants.ts index c46d0ee7a1..cf313c0492 100644 --- a/libs/features/conditions/src/edit-conditions/conditions-constants.ts +++ b/libs/features/conditions/src/edit-conditions/conditions-constants.ts @@ -133,6 +133,7 @@ CONDITION_VALUE_1_TOOLTIPS[CT.CONDITION_PET_TYPE] = 'CONDITIONS.EDITOR.VALUE1.CO CONDITION_VALUE_1_TOOLTIPS[CT.CONDITION_TAXI] = 'CONDITIONS.EDITOR.VALUE1.CONDITION_TAXI'; CONDITION_VALUE_1_TOOLTIPS[CT.CONDITION_QUESTSTATE] = 'CONDITIONS.EDITOR.VALUE1.CONDITION_QUESTSTATE'; CONDITION_VALUE_1_TOOLTIPS[CT.CONDITION_QUEST_OBJECTIVE_PROGRESS] = 'CONDITIONS.EDITOR.VALUE1.CONDITION_QUEST_OBJECTIVE_PROGRESS'; +CONDITION_VALUE_1_TOOLTIPS[CT.CONDITION_WORLD_SCRIPT] = 'CONDITIONS.EDITOR.VALUE1.CONDITION_WORLD_SCRIPT'; export const CONDITION_VALUE_2_TOOLTIPS: Record = {}; CONDITION_VALUE_2_TOOLTIPS[CT.CONDITION_NONE] = 'CONDITIONS.EDITOR.VALUE2.CONDITION_NONE'; @@ -184,6 +185,7 @@ CONDITION_VALUE_2_TOOLTIPS[CT.CONDITION_PET_TYPE] = 'ALWAYS_0'; CONDITION_VALUE_2_TOOLTIPS[CT.CONDITION_TAXI] = 'ALWAYS_0'; CONDITION_VALUE_2_TOOLTIPS[CT.CONDITION_QUESTSTATE] = 'CONDITIONS.EDITOR.VALUE2.CONDITION_QUESTSTATE'; CONDITION_VALUE_2_TOOLTIPS[CT.CONDITION_QUEST_OBJECTIVE_PROGRESS] = 'CONDITIONS.EDITOR.VALUE2.CONDITION_QUEST_OBJECTIVE_PROGRESS'; +CONDITION_VALUE_2_TOOLTIPS[CT.CONDITION_WORLD_SCRIPT] = 'CONDITIONS.EDITOR.VALUE2.CONDITION_WORLD_SCRIPT'; export const CONDITION_VALUE_3_TOOLTIPS: Record = {}; CONDITION_VALUE_3_TOOLTIPS[CT.CONDITION_NONE] = 'CONDITIONS.EDITOR.VALUE3.CONDITION_NONE'; @@ -235,3 +237,4 @@ CONDITION_VALUE_3_TOOLTIPS[CT.CONDITION_PET_TYPE] = 'ALWAYS_0'; CONDITION_VALUE_3_TOOLTIPS[CT.CONDITION_TAXI] = 'ALWAYS_0'; CONDITION_VALUE_3_TOOLTIPS[CT.CONDITION_QUESTSTATE] = 'ALWAYS_0'; CONDITION_VALUE_3_TOOLTIPS[CT.CONDITION_QUEST_OBJECTIVE_PROGRESS] = 'CONDITIONS.EDITOR.VALUE3.CONDITION_QUEST_OBJECTIVE_PROGRESS'; +CONDITION_VALUE_3_TOOLTIPS[CT.CONDITION_WORLD_SCRIPT] = 'ALWAYS_0'; diff --git a/libs/shared/acore-world-model/src/entities/conditions.type.ts b/libs/shared/acore-world-model/src/entities/conditions.type.ts index cba90a8a88..5f10b472bb 100644 --- a/libs/shared/acore-world-model/src/entities/conditions.type.ts +++ b/libs/shared/acore-world-model/src/entities/conditions.type.ts @@ -114,4 +114,5 @@ export enum CONDITION_TYPES { CONDITION_DIFFICULTY_ID, CONDITION_QUEST_SATISFY_EXCLUSIVE = 101, CONDITION_HAS_AURA_TYPE = 102, + CONDITION_WORLD_SCRIPT = 103, } diff --git a/libs/shared/sai-editor/src/constants/sai-actions.ts b/libs/shared/sai-editor/src/constants/sai-actions.ts index 5dbfc3f6b0..acce233529 100644 --- a/libs/shared/sai-editor/src/constants/sai-actions.ts +++ b/libs/shared/sai-editor/src/constants/sai-actions.ts @@ -177,6 +177,7 @@ export enum SAI_ACTIONS { MOVEMENT_STOP = 234, MOVEMENT_PAUSE = 235, MOVEMENT_RESUME = 236, + WORLD_SCRIPT = 237, } export const SAI_ACTIONS_KEYS = getEnumKeys(SAI_ACTIONS); export const SAI_ACTION_TOOLTIPS: Record = {}; @@ -1301,3 +1302,8 @@ SAI_ACTION_PARAM1_TOOLTIPS[SAI_ACTIONS.MOVEMENT_PAUSE] = 'ms'; SAI_ACTION_TOOLTIPS[SAI_ACTIONS.MOVEMENT_RESUME] = 'Calls MovementGenerator to resume movement. Not fully implemented'; SAI_ACTION_PARAM1_NAMES[SAI_ACTIONS.MOVEMENT_RESUME] = 'Timer Override'; SAI_ACTION_PARAM1_TOOLTIPS[SAI_ACTIONS.MOVEMENT_RESUME] = 'ms'; + +// SMART_ACTION_WORLD_SCRIPT +SAI_ACTION_TOOLTIPS[SAI_ACTIONS.WORLD_SCRIPT] = 'Calls WorldState::HandleExternalEvent(WorldStateEvent eventId, uint32 param)'; +SAI_ACTION_PARAM1_NAMES[SAI_ACTIONS.WORLD_SCRIPT] = 'eventId'; +SAI_ACTION_PARAM2_NAMES[SAI_ACTIONS.WORLD_SCRIPT] = 'param'; diff --git a/libs/shared/sai-editor/src/constants/sai-comments.ts b/libs/shared/sai-editor/src/constants/sai-comments.ts index 4528a7302b..581db51fd1 100644 --- a/libs/shared/sai-editor/src/constants/sai-comments.ts +++ b/libs/shared/sai-editor/src/constants/sai-comments.ts @@ -82,6 +82,7 @@ SAI_EVENT_COMMENTS[SAI_EVENTS.AREA_RANGE] = `On Hostile in Range`; SAI_EVENT_COMMENTS[SAI_EVENTS.SUMMONED_UNIT_EVADE] = `On Summoned Unit Evade`; SAI_EVENT_COMMENTS[SAI_EVENTS.WAYPOINT_DATA_REACHED] = `On Point _waypointParamOne_ of Path _waypointParamTwo_ Reached`; SAI_EVENT_COMMENTS[SAI_EVENTS.WAYPOINT_DATA_ENDED] = `On Path _eventParamTwo_ Finished`; +SAI_EVENT_COMMENTS[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'On Melee Range Target'; export const SAI_ACTION_COMMENTS: Record = {}; SAI_ACTION_COMMENTS[SAI_ACTIONS.NONE] = `No Action Type`; @@ -251,3 +252,4 @@ SAI_ACTION_COMMENTS[SAI_ACTIONS.WAYPOINT_DATA_RANDOM] = `Start Random Path _acti SAI_ACTION_COMMENTS[SAI_ACTIONS.MOVEMENT_STOP] = `Stop Movement`; SAI_ACTION_COMMENTS[SAI_ACTIONS.MOVEMENT_PAUSE] = `Pause Movement`; SAI_ACTION_COMMENTS[SAI_ACTIONS.MOVEMENT_RESUME] = `Resume Movement`; +SAI_ACTION_COMMENTS[SAI_ACTIONS.WORLD_SCRIPT] = `Run World State Script: Event: _actionParamOne_, Param: _actionParamTwo_`; diff --git a/libs/shared/sai-editor/src/constants/sai-event.ts b/libs/shared/sai-editor/src/constants/sai-event.ts index 07cc6cd947..e5be95f31c 100644 --- a/libs/shared/sai-editor/src/constants/sai-event.ts +++ b/libs/shared/sai-editor/src/constants/sai-event.ts @@ -89,6 +89,7 @@ export enum SAI_EVENTS { SUMMONED_UNIT_EVADE = 107, WAYPOINT_DATA_REACHED = 108, WAYPOINT_DATA_ENDED = 109, + IS_IN_MELEE_RANGE = 110, } export const SAI_EVENTS_KEYS = getEnumKeys(SAI_EVENTS); export const SAI_EVENT_TOOLTIPS: string[] = []; @@ -719,3 +720,18 @@ SAI_EVENT_PARAM1_NAMES[SAI_EVENTS.WAYPOINT_DATA_ENDED] = 'PointId'; SAI_EVENT_PARAM2_NAMES[SAI_EVENTS.WAYPOINT_DATA_ENDED] = 'PathId'; SAI_EVENT_PARAM1_TOOLTIPS[SAI_EVENTS.WAYPOINT_DATA_ENDED] = 'unused'; SAI_EVENT_PARAM2_TOOLTIPS[SAI_EVENTS.WAYPOINT_DATA_ENDED] = '0: any'; + +// SMART_EVENT_IS_IN_MELEE_RANGE +SAI_EVENT_TOOLTIPS[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'On Melee Range Target'; +SAI_EVENT_PARAM1_NAMES[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'InitialMin'; +SAI_EVENT_PARAM2_NAMES[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'InitialMax'; +SAI_EVENT_PARAM3_NAMES[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'RepeatMin'; +SAI_EVENT_PARAM4_NAMES[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'RepeatMax'; +SAI_EVENT_PARAM5_NAMES[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'dist'; +SAI_EVENT_PARAM6_NAMES[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'invert'; +SAI_EVENT_PARAM1_TOOLTIPS[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'ms'; +SAI_EVENT_PARAM2_TOOLTIPS[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'ms'; +SAI_EVENT_PARAM3_TOOLTIPS[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'ms'; +SAI_EVENT_PARAM4_TOOLTIPS[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'ms'; +SAI_EVENT_PARAM5_TOOLTIPS[SAI_EVENTS.IS_IN_MELEE_RANGE] = 'dist param IsWithinMeleeRange (yards), default: 0'; +SAI_EVENT_PARAM6_TOOLTIPS[SAI_EVENTS.IS_IN_MELEE_RANGE] = '0: no invert, 1: invert';