diff --git a/includes/defines.php b/includes/defines.php index 56fb231b..813fd27f 100644 --- a/includes/defines.php +++ b/includes/defines.php @@ -479,19 +479,115 @@ define('NPC_RANK_RARE_ELITE', 2); define('NPC_RANK_BOSS', 3); define('NPC_RANK_RARE', 4); +define('NPC_FLAG_GOSSIP', 0x00000001); +define('NPC_FLAG_QUEST_GIVER', 0x00000002); define('NPC_FLAG_TRAINER', 0x00000010); define('NPC_FLAG_CLASS_TRAINER', 0x00000020); +define('NPC_PROFESSION_TRAINER', 0x00000040); define('NPC_FLAG_VENDOR', 0x00000080); +define('NPC_FLAG_VENDOR_AMMO', 0x00000100); +define('NPC_FLAG_VENDOR_FOOD', 0x00000200); +define('NPC_FLAG_VENDOR_POISON', 0x00000400); +define('NPC_FLAG_VENDOR_REAGENT', 0x00000800); define('NPC_FLAG_REPAIRER', 0x00001000); define('NPC_FLAG_FLIGHT_MASTER', 0x00002000); define('NPC_FLAG_SPIRIT_HEALER', 0x00004000); // civil define('NPC_FLAG_SPIRIT_GUIDE', 0x00008000); // battleground define('NPC_FLAG_INNKEEPER', 0x00010000); define('NPC_FLAG_BANKER', 0x00020000); +define('NPC_FLAG_PETITIONER', 0x00040000); define('NPC_FLAG_GUILD_MASTER', 0x00080000); define('NPC_FLAG_BATTLEMASTER', 0x00100000); define('NPC_FLAG_AUCTIONEER', 0x00200000); define('NPC_FLAG_STABLE_MASTER', 0x00400000); +define('NPC_FLAG_GUILD_BANK', 0x00800000); +define('NPC_FLAG_SPELLCLICK', 0x01000000); +define('NPC_FLAG_MAILBOX', 0x04000000); + +define('UNIT_FLAG_SERVER_CONTROLLED', 0x00000001); // +define('UNIT_FLAG_NON_ATTACKABLE', 0x00000002); // +define('UNIT_FLAG_REMOVE_CLIENT_CONTROL', 0x00000004); // +define('UNIT_FLAG_PVP_ATTACKABLE', 0x00000008); // Allows to apply PvP rules to attackable state in addition to faction dependent state +define('UNIT_FLAG_RENAME', 0x00000010); // +define('UNIT_FLAG_PREPARATION', 0x00000020); // Don't take reagents for spells with SPELL_ATTR_EX5_NO_REAGENT_WHILE_PREP +define('UNIT_FLAG_UNK_6', 0x00000040); // not sure what it does, but it is needed to cast nontriggered spells in smart_scripts +define('UNIT_FLAG_NOT_ATTACKABLE_1', 0x00000080); // UNIT_FLAG_PVP_ATTACKABLE| UNIT_FLAG_NOT_ATTACKABLE_1 is NON_PVP_ATTACKABLE +define('UNIT_FLAG_IMMUNE_TO_PC', 0x00000100); // disables combat/assistance with PlayerCharacters (PC) +define('UNIT_FLAG_IMMUNE_TO_NPC', 0x00000200); // disables combat/assistance with NonPlayerCharacters (NPC) +define('UNIT_FLAG_LOOTING', 0x00000400); // Loot animation +define('UNIT_FLAG_PET_IN_COMBAT', 0x00000800); // In combat? 2.0.8 +define('UNIT_FLAG_PVP', 0x00001000); // Changed in 3.0.3 +define('UNIT_FLAG_SILENCED', 0x00002000); // Can't cast spells +define('UNIT_FLAG_CANNOT_SWIM', 0x00004000); // 2.0.8 +define('UNIT_FLAG_UNK_15', 0x00008000); // Only Swim ('OnlySwim' from UnitFlags.cs in WPP) +define('UNIT_FLAG_UNK_16', 0x00010000); // No Attack 2 ('NoAttack2' from UnitFlags.cs in WPP) +define('UNIT_FLAG_PACIFIED', 0x00020000); // Creature will not attack +define('UNIT_FLAG_STUNNED', 0x00040000); // 3.0.3 ok +define('UNIT_FLAG_IN_COMBAT', 0x00080000); // ('AffectingCombat' from UnitFlags.cs in WPP) +define('UNIT_FLAG_TAXI_FLIGHT', 0x00100000); // Disable casting at client side spell not allowed by taxi flight (mounted?), probably used with 0x4 flag +define('UNIT_FLAG_DISARMED', 0x00200000); // 3.0.3, disable melee spells casting..., "Required melee weapon" added to melee spells tooltip. +define('UNIT_FLAG_CONFUSED', 0x00400000); // Confused. +define('UNIT_FLAG_FLEEING', 0x00800000); // ('Feared' from UnitFlags.cs in WPP) +define('UNIT_FLAG_PLAYER_CONTROLLED', 0x01000000); // Used in spell Eyes of the Beast for pet... let attack by controlled creature. Also used by Vehicles (PCV). +define('UNIT_FLAG_NOT_SELECTABLE', 0x02000000); // Can't be selected by mouse or with /target {name} command. +define('UNIT_FLAG_SKINNABLE', 0x04000000); // Skinnable +define('UNIT_FLAG_MOUNT', 0x08000000); // The client seems to handle it perfectly. Also used when making custom mounts. +define('UNIT_FLAG_UNK_28', 0x10000000); // (PreventKneelingWhenLooting from UnitFlags.cs in WPP) +define('UNIT_FLAG_UNK_29', 0x20000000); // Used in Feign Death spell or NPC will play dead. (PreventEmotes) +define('UNIT_FLAG_SHEATHE', 0x40000000); // +define('UNIT_FLAG_UNK_31', 0x80000000); // + +define('UNIT_FLAG2_FEIGN_DEATH', 0x00000001); // +define('UNIT_FLAG2_UNK1', 0x00000002); // Hide unit model (show only player equip) +define('UNIT_FLAG2_IGNORE_REPUTATION', 0x00000004); // +define('UNIT_FLAG2_COMPREHEND_LANG', 0x00000008); // +define('UNIT_FLAG2_MIRROR_IMAGE', 0x00000010); // +define('UNIT_FLAG2_INSTANTLY_APPEAR_MODEL', 0x00000020); // Unit model instantly appears when summoned (does not fade in) +define('UNIT_FLAG2_FORCE_MOVEMENT', 0x00000040); // +define('UNIT_FLAG2_DISARM_OFFHAND', 0x00000080); // +define('UNIT_FLAG2_DISABLE_PRED_STATS', 0x00000100); // Player has disabled predicted stats (Used by raid frames) +define('UNIT_FLAG2_DISARM_RANGED', 0x00000400); // this does not disable ranged weapon display (maybe additional flag needed?) +define('UNIT_FLAG2_REGENERATE_POWER', 0x00000800); // +define('UNIT_FLAG2_RESTRICT_PARTY_INTERACTION', 0x1000); // Restrict interaction to party or raid +define('UNIT_FLAG2_PREVENT_SPELL_CLICK', 0x00002000); // Prevent spellclick +define('UNIT_FLAG2_ALLOW_ENEMY_INTERACT', 0x00004000); // +define('UNIT_FLAG2_DISABLE_TURN', 0x00008000); // +define('UNIT_FLAG2_UNK2', 0x00010000); // +define('UNIT_FLAG2_PLAY_DEATH_ANIM', 0x00020000); // Plays special death animation upon death +define('UNIT_FLAG2_ALLOW_CHEAT_SPELLS', 0x00040000); // allows casting spells with AttributesEx7 & SPELL_ATTR7_IS_CHEAT_SPELL + +// UNIT_FIELD_BYTES_1 - idx 0 (UnitStandStateType) +define('UNIT_STAND_STATE_STAND', 0); +define('UNIT_STAND_STATE_SIT', 1); +define('UNIT_STAND_STATE_SIT_CHAIR', 2); +define('UNIT_STAND_STATE_SLEEP', 3); +define('UNIT_STAND_STATE_SIT_LOW_CHAIR', 4); +define('UNIT_STAND_STATE_SIT_MEDIUM_CHAIR', 5); +define('UNIT_STAND_STATE_SIT_HIGH_CHAIR', 6); +define('UNIT_STAND_STATE_DEAD', 7); +define('UNIT_STAND_STATE_KNEEL', 8); +define('UNIT_STAND_STATE_SUBMERGED', 9); + +// UNIT_FIELD_BYTES_1 - idx 2 (UnitStandFlags) +define('UNIT_STAND_FLAGS_UNK1', 0x01); +define('UNIT_STAND_FLAGS_CREEP', 0x02); +define('UNIT_STAND_FLAGS_UNTRACKABLE', 0x04); +define('UNIT_STAND_FLAGS_UNK4', 0x08); +define('UNIT_STAND_FLAGS_UNK5', 0x10); + +// UNIT_FIELD_BYTES_1 - idx 3 (UnitBytes1_Flags) +define('UNIT_BYTE1_FLAG_ALWAYS_STAND', 0x01); +define('UNIT_BYTE1_FLAG_HOVER', 0x02); +define('UNIT_BYTE1_FLAG_UNK_3', 0x04); + +define('UNIT_DYNFLAG_LOOTABLE', 0x01); // +define('UNIT_DYNFLAG_TRACK_UNIT', 0x02); // Creature's location will be seen as a small dot in the minimap +define('UNIT_DYNFLAG_TAPPED', 0x04); // Makes creatures name appear grey (Lua_UnitIsTapped) +define('UNIT_DYNFLAG_TAPPED_BY_PLAYER', 0x08); // Lua_UnitIsTappedByPlayer usually used by PCVs (Player Controlled Vehicles) +define('UNIT_DYNFLAG_SPECIALINFO', 0x10); // +define('UNIT_DYNFLAG_DEAD', 0x20); // Makes the creature appear dead (this DOES NOT make the creature's name grey or not attack players). +define('UNIT_DYNFLAG_REFER_A_FRIEND', 0x40); // +define('UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST', 0x80); // Lua_UnitIsTappedByAllThreatList // quest define('QUEST_FLAG_STAY_ALIVE', 0x00001); @@ -551,6 +647,20 @@ define('OBJECT_DESTRUCTIBLE_BUILDING', 33); define('OBJECT_GUILD_BANK', 34); define('OBJECT_TRAPDOOR', 35); +define('GO_FLAG_IN_USE', 0x0001); // Gameobject in use - Disables interaction while being animated +define('GO_FLAG_LOCKED', 0x0002); // Makes the Gameobject Locked. Requires a key, spell, or event to be opened. "Locked" appears in tooltip +define('GO_FLAG_INTERACT_COND', 0x0004); // Untargetable, cannot interact +define('GO_FLAG_TRANSPORT', 0x0008); // Gameobject can transport (boat, elevator, car) +define('GO_FLAG_NOT_SELECTABLE', 0x0010); // Not selectable (Not even in GM-mode) +define('GO_FLAG_NODESPAWN', 0x0020); // Never despawns. Typical for gameobjects with on/off state (doors for example) +define('GO_FLAG_TRIGGERED', 0x0040); // typically, summoned objects. Triggered by spell or other events +define('GO_FLAG_DAMAGED', 0x0200); // Gameobject has been siege damaged +define('GO_FLAG_DESTROYED', 0x0400); // Gameobject has been destroyed + +define('GO_STATE_ACTIVE', 0); // show in world as used and not reset (closed door open) +define('GO_STATE_READY', 1); // show in world as ready (closed door close) +define('GO_STATE_ACTIVE_ALTERNATIVE', 2); // show in world as used in alt way and not reset (closed door open by cannon fire) + // InventoryType define('INVTYPE_NON_EQUIP', 0); define('INVTYPE_HEAD', 1); @@ -888,6 +998,294 @@ define('CND_ALIVE', 36); // target is alive: define('CND_HP_VAL', 37); // targets absolute health: amount, operator, NULL define('CND_HP_PCT', 38); // targets relative health: amount, operator, NULL +// TrinityCore - SmartAI +define('SAI_SRC_TYPE_CREATURE', 0); +define('SAI_SRC_TYPE_OBJECT', 1); +define('SAI_SRC_TYPE_AREATRIGGER', 2); +define('SAI_SRC_TYPE_ACTIONLIST', 9); + +define('SAI_EVENT_FLAG_NO_REPEAT', 0x0001); +define('SAI_EVENT_FLAG_DIFFICULTY_0', 0x0002); +define('SAI_EVENT_FLAG_DIFFICULTY_1', 0x0004); +define('SAI_EVENT_FLAG_DIFFICULTY_2', 0x0008); +define('SAI_EVENT_FLAG_DIFFICULTY_3', 0x0010); +define('SAI_EVENT_FLAG_NO_RESET', 0x0100); +define('SAI_EVENT_FLAG_WHILE_CHARMED', 0x0200); + +define('SAI_EVENT_UPDATE_IC', 0); // In combat. +define('SAI_EVENT_UPDATE_OOC', 1); // Out of combat. +define('SAI_EVENT_HEALT_PCT', 2); // Health Percentage +define('SAI_EVENT_MANA_PCT', 3); // Mana Percentage +define('SAI_EVENT_AGGRO', 4); // On Creature Aggro +define('SAI_EVENT_KILL', 5); // On Creature Kill +define('SAI_EVENT_DEATH', 6); // On Creature Death +define('SAI_EVENT_EVADE', 7); // On Creature Evade Attack +define('SAI_EVENT_SPELLHIT', 8); // On Creature/Gameobject Spell Hit +define('SAI_EVENT_RANGE', 9); // On Target In Range +define('SAI_EVENT_OOC_LOS', 10); // On Target In Distance Out of Combat +define('SAI_EVENT_RESPAWN', 11); // On Creature/Gameobject Respawn +define('SAI_EVENT_TARGET_HEALTH_PCT', 12); // On Target Health Percentage +define('SAI_EVENT_VICTIM_CASTING', 13); // On Target Casting Spell +define('SAI_EVENT_FRIENDLY_HEALTH', 14); // On Friendly Health Deficit +define('SAI_EVENT_FRIENDLY_IS_CC', 15); // +define('SAI_EVENT_FRIENDLY_MISSING_BUFF', 16); // On Friendly Lost Buff +define('SAI_EVENT_SUMMONED_UNIT', 17); // On Creature/Gameobject Summoned Unit +define('SAI_EVENT_TARGET_MANA_PCT', 18); // On Target Mana Percentage +define('SAI_EVENT_ACCEPTED_QUEST', 19); // On Target Accepted Quest +define('SAI_EVENT_REWARD_QUEST', 20); // On Target Rewarded Quest +define('SAI_EVENT_REACHED_HOME', 21); // On Creature Reached Home +define('SAI_EVENT_RECEIVE_EMOTE', 22); // On Receive Emote. +define('SAI_EVENT_HAS_AURA', 23); // On Creature Has Aura +define('SAI_EVENT_TARGET_BUFFED', 24); // On Target Buffed With Spell +define('SAI_EVENT_RESET', 25); // After Combat, On Respawn or Spawn +define('SAI_EVENT_IC_LOS', 26); // On Target In Distance In Combat +define('SAI_EVENT_PASSENGER_BOARDED', 27); // +define('SAI_EVENT_PASSENGER_REMOVED', 28); // +define('SAI_EVENT_CHARMED', 29); // On Creature Charmed +define('SAI_EVENT_CHARMED_TARGET', 30); // On Target Charmed +define('SAI_EVENT_SPELLHIT_TARGET', 31); // On Target Spell Hit +define('SAI_EVENT_DAMAGED', 32); // On Creature Damaged +define('SAI_EVENT_DAMAGED_TARGET', 33); // On Target Damaged +define('SAI_EVENT_MOVEMENTINFORM', 34); // WAYPOINT_MOTION_TYPE = 2, POINT_MOTION_TYPE = 8 +define('SAI_EVENT_SUMMON_DESPAWNED', 35); // On Summoned Unit Despawned +define('SAI_EVENT_CORPSE_REMOVED', 36); // On Creature Corpse Removed +define('SAI_EVENT_AI_INIT', 37); // +define('SAI_EVENT_DATA_SET', 38); // On Creature/Gameobject Data Set, Can be used with SMART_ACTION_SET_DATA +define('SAI_EVENT_WAYPOINT_START', 39); // On Creature Waypoint ID Started +define('SAI_EVENT_WAYPOINT_REACHED', 40); // On Creature Waypoint ID Reached +// define('SAI_EVENT_TRANSPORT_ADDPLAYER', 41); // +// define('SAI_EVENT_TRANSPORT_ADDCREATURE', 42); // +// define('SAI_EVENT_TRANSPORT_REMOVE_PLAYER', 43); // +// define('SAI_EVENT_TRANSPORT_RELOCATE', 44); // +// define('SAI_EVENT_INSTANCE_PLAYER_ENTER', 45); // +define('SAI_EVENT_AREATRIGGER_ONTRIGGER', 46); // +// define('SAI_EVENT_QUEST_ACCEPTED', 47); // On Target Quest Accepted +// define('SAI_EVENT_QUEST_OBJ_COMPLETION', 48); // On Target Quest Objective Completed +// define('SAI_EVENT_QUEST_COMPLETION', 49); // On Target Quest Completed +// define('SAI_EVENT_QUEST_REWARDED', 50); // On Target Quest Rewarded +// define('SAI_EVENT_QUEST_FAIL', 51); // On Target Quest Field +define('SAI_EVENT_TEXT_OVER', 52); // On TEXT_OVER Event Triggered After SMART_ACTION_TALK +define('SAI_EVENT_RECEIVE_HEAL', 53); // On Creature Received Healing +define('SAI_EVENT_JUST_SUMMONED', 54); // On Creature Just spawned +define('SAI_EVENT_WAYPOINT_PAUSED', 55); // On Creature Paused at Waypoint ID +define('SAI_EVENT_WAYPOINT_RESUMED', 56); // On Creature Resumed after Waypoint ID +define('SAI_EVENT_WAYPOINT_STOPPED', 57); // On Creature Stopped On Waypoint ID +define('SAI_EVENT_WAYPOINT_ENDED', 58); // On Creature Waypoint Path Ended +define('SAI_EVENT_TIMED_EVENT_TRIGGERED', 59); // +define('SAI_EVENT_UPDATE', 60); // +define('SAI_EVENT_LINK', 61); // Used to link together multiple events as a chain of events. +define('SAI_EVENT_GOSSIP_SELECT', 62); // On gossip clicked (gossip_menu_option335). +define('SAI_EVENT_JUST_CREATED', 63); // +define('SAI_EVENT_GOSSIP_HELLO', 64); // On Right-Click Creature/Gameobject that have gossip enabled. +define('SAI_EVENT_FOLLOW_COMPLETED', 65); // +define('SAI_EVENT_EVENT_PHASE_CHANGE', 66); // On event phase mask set +define('SAI_EVENT_IS_BEHIND_TARGET', 67); // On Creature is behind target. +define('SAI_EVENT_GAME_EVENT_START', 68); // On game_event started. +define('SAI_EVENT_GAME_EVENT_END', 69); // On game_event ended. +define('SAI_EVENT_GO_STATE_CHANGED', 70); // +define('SAI_EVENT_GO_EVENT_INFORM', 71); // +define('SAI_EVENT_ACTION_DONE', 72); // +define('SAI_EVENT_ON_SPELLCLICK', 73); // +define('SAI_EVENT_FRIENDLY_HEALTH_PCT', 74); // +define('SAI_EVENT_DISTANCE_CREATURE', 75); // On creature guid OR any instance of creature entry is within distance. +define('SAI_EVENT_DISTANCE_GAMEOBJECT', 76); // On gameobject guid OR any instance of gameobject entry is within distance. +define('SAI_EVENT_COUNTER_SET', 77); // If the value of specified counterID is equal to a specified value + +define('SAI_ACTION_NONE', 0); // Do nothing +define('SAI_ACTION_TALK', 1); // Param2 in Milliseconds. +define('SAI_ACTION_SET_FACTION', 2); // Sets faction to creature. +define('SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL', 3); // Take DisplayID of creature (param1) OR Turn to DisplayID (param2) OR Both = 0 for Demorph +define('SAI_ACTION_SOUND', 4); // TextRange = 0 only sends sound to self, TextRange = 1 sends sound to everyone in visibility range +define('SAI_ACTION_PLAY_EMOTE', 5); // Play Emote +define('SAI_ACTION_FAIL_QUEST', 6); // Fail Quest of Target +define('SAI_ACTION_OFFER_QUEST', 7); // Add Quest to Target +define('SAI_ACTION_SET_REACT_STATE', 8); // React State. Can be Passive (0), Defensive (1), Aggressive (2), Assist (3). +define('SAI_ACTION_ACTIVATE_GOBJECT', 9); // Activate Object +define('SAI_ACTION_RANDOM_EMOTE', 10); // Play Random Emote +define('SAI_ACTION_CAST', 11); // Cast Spell ID at Target +define('SAI_ACTION_SUMMON_CREATURE', 12); // Summon Unit +define('SAI_ACTION_THREAT_SINGLE_PCT', 13); // Change Threat Percentage for Single Target +define('SAI_ACTION_THREAT_ALL_PCT', 14); // Change Threat Percentage for All Enemies +define('SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS', 15); // +// define('SAI_ACTION_SET_INGAME_PHASE_ID', 16); // For 4.3.4 + only +define('SAI_ACTION_SET_EMOTE_STATE', 17); // Play Emote Continuously +define('SAI_ACTION_SET_UNIT_FLAG', 18); // Can set Multi-able flags at once +define('SAI_ACTION_REMOVE_UNIT_FLAG', 19); // Can Remove Multi-able flags at once +define('SAI_ACTION_AUTO_ATTACK', 20); // Stop or Continue Automatic Attack. +define('SAI_ACTION_ALLOW_COMBAT_MOVEMENT', 21); // Allow or Disable Combat Movement +define('SAI_ACTION_SET_EVENT_PHASE', 22); // +define('SAI_ACTION_INC_EVENT_PHASE', 23); // Set param1 OR param2 (not both). Value 0 has no effect. +define('SAI_ACTION_EVADE', 24); // Evade Incoming Attack +define('SAI_ACTION_FLEE_FOR_ASSIST', 25); // If you want the fleeing NPC to say '%s attempts to run away in fear' on flee, use 1 on param1. 0 for no message. +define('SAI_ACTION_CALL_GROUPEVENTHAPPENS', 26); // +define('SAI_ACTION_COMBAT_STOP', 27); // +define('SAI_ACTION_REMOVEAURASFROMSPELL', 28); // 0 removes all auras +define('SAI_ACTION_FOLLOW', 29); // Follow Target +define('SAI_ACTION_RANDOM_PHASE', 30); // +define('SAI_ACTION_RANDOM_PHASE_RANGE', 31); // +define('SAI_ACTION_RESET_GOBJECT', 32); // Reset Gameobject +define('SAI_ACTION_CALL_KILLEDMONSTER', 33); // This is the ID from quest_template.RequiredNpcOrGo +define('SAI_ACTION_SET_INST_DATA', 34); // Set Instance Data +// define('SAI_ACTION_SET_INST_DATA64', 35); // Set Instance Data uint64 +define('SAI_ACTION_UPDATE_TEMPLATE', 36); // Updates creature_template to given entry +define('SAI_ACTION_DIE', 37); // Kill Target +define('SAI_ACTION_SET_IN_COMBAT_WITH_ZONE', 38); // +define('SAI_ACTION_CALL_FOR_HELP', 39); // If you want the NPC to say '%s calls for help!'. Use 1 on param1, 0 for no message. +define('SAI_ACTION_SET_SHEATH', 40); // +define('SAI_ACTION_FORCE_DESPAWN', 41); // Despawn Target after param1 in Milliseconds. If you want to set respawn time set param2 in seconds. +define('SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL', 42); // If you use both params, only percent will be used. +define('SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL', 43); // Mount to Creature Entry (param1) OR Mount to Creature Display (param2) Or both = 0 for Unmount +define('SAI_ACTION_SET_INGAME_PHASE_MASK', 44); // +define('SAI_ACTION_SET_DATA', 45); // Set Data For Target, can be used with SMART_EVENT_DATA_SET +// define('SAI_ACTION_UNUSED_46', 46); // +define('SAI_ACTION_SET_VISIBILITY', 47); // Makes creature Visible = 1 or Invisible = 0 +define('SAI_ACTION_SET_ACTIVE', 48); // +define('SAI_ACTION_ATTACK_START', 49); // Allows basic melee swings to creature. +define('SAI_ACTION_SUMMON_GO', 50); // Spawns Gameobject, use target_type to set spawn position. +define('SAI_ACTION_KILL_UNIT', 51); // Kills Creature. +define('SAI_ACTION_ACTIVATE_TAXI', 52); // Sends player to flight path. You have to be close to Flight Master, which gives Taxi ID you need. +define('SAI_ACTION_WP_START', 53); // Creature starts Waypoint Movement. Use waypoints table to create movement. +define('SAI_ACTION_WP_PAUSE', 54); // Creature pauses its Waypoint Movement for given time. +define('SAI_ACTION_WP_STOP', 55); // Creature stops its Waypoint Movement. +define('SAI_ACTION_ADD_ITEM', 56); // Adds item(s) to player. +define('SAI_ACTION_REMOVE_ITEM', 57); // Removes item(s) from player. +define('SAI_ACTION_INSTALL_AI_TEMPLATE', 58); // +define('SAI_ACTION_SET_RUN', 59); // +define('SAI_ACTION_SET_DISABLE_GRAVITY', 60); // Only works for creatures with inhabit air. +define('SAI_ACTION_SET_SWIM', 61); // +define('SAI_ACTION_TELEPORT', 62); // Continue this action with the TARGET_TYPE column. Use any target_type (except 0), and use target_x, target_y, target_z, target_o as the coordinates +define('SAI_ACTION_SET_COUNTER', 63); // +define('SAI_ACTION_STORE_TARGET_LIST', 64); // +define('SAI_ACTION_WP_RESUME', 65); // Creature continues in its Waypoint Movement. +define('SAI_ACTION_SET_ORIENTATION', 66); // +define('SAI_ACTION_CREATE_TIMED_EVENT', 67); // +define('SAI_ACTION_PLAYMOVIE', 68); // +define('SAI_ACTION_MOVE_TO_POS', 69); // PointId is called by SMART_EVENT_MOVEMENTINFORM. Continue this action with the TARGET_TYPE column. Use any target_type, and use target_x, target_y, target_z, target_o as the coordinates +define('SAI_ACTION_ENABLE_TEMP_GOBJ', 70); // Always action_param1>0 For npcs use action_type=133 +define('SAI_ACTION_EQUIP', 71); // only slots with mask set will be sent to client, bits are 1, 2, 4, leaving mask 0 is defaulted to mask 7 (send all), Slots1-3 are only used if no Param1 is set +define('SAI_ACTION_CLOSE_GOSSIP', 72); // Closes gossip window. +define('SAI_ACTION_TRIGGER_TIMED_EVENT', 73); // +define('SAI_ACTION_REMOVE_TIMED_EVENT', 74); // +define('SAI_ACTION_ADD_AURA', 75); // Adds aura to player(s). Use target_type 17 to make AoE aura. +define('SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT', 76); // WARNING: CAN CRASH CORE, do not use if you dont know what you are doing +define('SAI_ACTION_RESET_SCRIPT_BASE_OBJECT', 77); // +define('SAI_ACTION_CALL_SCRIPT_RESET', 78); // +define('SAI_ACTION_SET_RANGED_MOVEMENT', 79); // Sets movement to follow at a specific range to the target. +define('SAI_ACTION_CALL_TIMED_ACTIONLIST', 80); // +define('SAI_ACTION_SET_NPC_FLAG', 81); // +define('SAI_ACTION_ADD_NPC_FLAG', 82); // +define('SAI_ACTION_REMOVE_NPC_FLAG', 83); // +define('SAI_ACTION_SIMPLE_TALK', 84); // Makes a player say text. SMART_EVENT_TEXT_OVER is not triggered and whispers can not be used. +define('SAI_ACTION_INVOKER_CAST', 85); // if avaliable, last used invoker will cast spellId with castFlags on targets +define('SAI_ACTION_CROSS_CAST', 86); // This action is used to make selected caster (in CasterTargetType) to cast spell. Actual target is entered in target_type as normally. +define('SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST', 87); // Will select one entry from the ones provided. 0 is ignored. +define('SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST', 88); // 0 is ignored. +define('SAI_ACTION_RANDOM_MOVE', 89); // Creature moves to random position in given radius. +define('SAI_ACTION_SET_UNIT_FIELD_BYTES_1', 90); // +define('SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1', 91); // +define('SAI_ACTION_INTERRUPT_SPELL', 92); // This action allows you to interrupt the current spell being cast. If you do not set the spellId, the core will find the current spell depending on the withDelay and the withInstant values. +define('SAI_ACTION_SEND_GO_CUSTOM_ANIM', 93); // +define('SAI_ACTION_SET_DYNAMIC_FLAG', 94); // +define('SAI_ACTION_ADD_DYNAMIC_FLAG', 95); // +define('SAI_ACTION_REMOVE_DYNAMIC_FLAG', 96); // +define('SAI_ACTION_JUMP_TO_POS', 97); // +define('SAI_ACTION_SEND_GOSSIP_MENU', 98); // Can be used together with 'SMART_EVENT_GOSSIP_HELLO' to set custom gossip. +define('SAI_ACTION_GO_SET_LOOT_STATE', 99); // +define('SAI_ACTION_SEND_TARGET_TO_TARGET', 100); // Send targets previously stored with SMART_ACTION_STORE_TARGET, to another npc/go, the other npc/go can then access them as if it was its own stored list +define('SAI_ACTION_SET_HOME_POS', 101); // Use with SMART_TARGET_SELF or SMART_TARGET_POSITION +define('SAI_ACTION_SET_HEALTH_REGEN', 102); // Sets the current creatures health regen on or off. +define('SAI_ACTION_SET_ROOT', 103); // Enables or disables creature movement +define('SAI_ACTION_SET_GO_FLAG', 104); // oldFlag = newFlag +define('SAI_ACTION_ADD_GO_FLAG', 105); // oldFlag |= newFlag +define('SAI_ACTION_REMOVE_GO_FLAG', 106); // oldFlag &= ~newFlag +define('SAI_ACTION_SUMMON_CREATURE_GROUP', 107); // Use creature_summon_groups table. SAI target has no effect, use 0 +define('SAI_ACTION_SET_POWER', 108); // +define('SAI_ACTION_ADD_POWER', 109); // +define('SAI_ACTION_REMOVE_POWER', 110); // +define('SAI_ACTION_GAME_EVENT_STOP', 111); // +define('SAI_ACTION_GAME_EVENT_START', 112); // +define('SAI_ACTION_START_CLOSEST_WAYPOINT', 113); // Make target follow closest waypoint to its location +define('SAI_ACTION_MOVE_OFFSET', 114); // Use target_x, target_y, target_z With target_type=1 +define('SAI_ACTION_RANDOM_SOUND', 115); // +define('SAI_ACTION_SET_CORPSE_DELAY', 116); // +define('SAI_ACTION_DISABLE_EVADE', 117); // +define('SAI_ACTION_GO_SET_GO_STATE', 118); // +define('SAI_ACTION_SET_CAN_FLY', 119); // +define('SAI_ACTION_REMOVE_AURAS_BY_TYPE', 120); // +define('SAI_ACTION_SET_SIGHT_DIST', 121); // +define('SAI_ACTION_FLEE', 122); // +define('SAI_ACTION_ADD_THREAT', 123); // +define('SAI_ACTION_LOAD_EQUIPMENT', 124); // +define('SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT', 125); // +define('SAI_ACTION_REMOVE_ALL_GAMEOBJECTS', 126); // +define('SAI_ACTION_STOP_MOTION', 127); // +// define('SAI_ACTION_PLAY_ANIMKIT', 128); // // don't use on 3.3.5a +// define('SAI_ACTION_SCENE_PLAY', 129); // // don't use on 3.3.5a +// define('SAI_ACTION_SCENE_CANCEL', 130); // // don't use on 3.3.5a +define('SAI_ACTION_SPAWN_SPAWNGROUP', 131); // +define('SAI_ACTION_DESPAWN_SPAWNGROUP', 132); // +define('SAI_ACTION_RESPAWN_BY_SPAWNID', 133); // Use to respawn npcs and gobs, the target in this case is always=1 and only a single unit could be a target via the spawnId (action_param1, action_param2) + +define('SAI_CAST_FLAG_INTERRUPT_PREV', 0x01); +define('SAI_CAST_FLAG_TRIGGERED', 0x02); +// define('SAI_CAST_FORCE_CAST', 0x04); // Forces cast even if creature is out of mana or out of range +// define('SAI_CAST_NO_MELEE_IF_OOM', 0x08); // Prevents creature from entering melee if out of mana or out of range +// define('SAI_CAST_FORCE_TARGET_SELF', 0x10); // the target to cast this spell on itself +define('SAI_CAST_FLAG_AURA_MISSING', 0x20); +define('SAI_CAST_FLAG_COMBAT_MOVE', 0x40); + +define('SAI_REACT_PASSIVE', 0); +define('SAI_REACT_DEFENSIVE', 1); +define('SAI_REACT_AGGRESSIVE', 2); +define('SAI_REACT_ASSIST', 3); + +define('SAI_SUMMON_TIMED_OR_DEAD_DESPAWN', 1); +define('SAI_SUMMON_TIMED_OR_CORPSE_DESPAWN', 2); +define('SAI_SUMMON_TIMED_DESPAWN', 3); +define('SAI_SUMMON_TIMED_DESPAWN_OOC', 4); +define('SAI_SUMMON_CORPSE_DESPAWN', 5); +define('SAI_SUMMON_CORPSE_TIMED_DESPAWN', 6); +define('SAI_SUMMON_DEAD_DESPAWN', 7); +define('SAI_SUMMON_MANUAL_DESPAWN', 8); + +define('SAI_TARGET_NONE', 0); // None. +define('SAI_TARGET_SELF', 1); // Self cast. +define('SAI_TARGET_VICTIM', 2); // Our current target. (ie: highest aggro) +define('SAI_TARGET_HOSTILE_SECOND_AGGRO', 3); // Second highest aggro. +define('SAI_TARGET_HOSTILE_LAST_AGGRO', 4); // Dead last on aggro. +define('SAI_TARGET_HOSTILE_RANDOM', 5); // Just any random target on our threat list. +define('SAI_TARGET_HOSTILE_RANDOM_NOT_TOP', 6); // Any random target except top threat. +define('SAI_TARGET_ACTION_INVOKER', 7); // Unit who caused this Event to occur. +define('SAI_TARGET_POSITION', 8); // Use xyz from event params. +define('SAI_TARGET_CREATURE_RANGE', 9); // (Random?) creature with specified ID within specified range. +define('SAI_TARGET_CREATURE_GUID', 10); // Creature with specified GUID. +define('SAI_TARGET_CREATURE_DISTANCE', 11); // Creature with specified ID within distance. (Different from #9?) +define('SAI_TARGET_STORED', 12); // Uses pre-stored target(list) +define('SAI_TARGET_GAMEOBJECT_RANGE', 13); // (Random?) object with specified ID within specified range. +define('SAI_TARGET_GAMEOBJECT_GUID', 14); // Object with specified GUID. +define('SAI_TARGET_GAMEOBJECT_DISTANCE', 15); // Object with specified ID within distance. (Different from #13?) +define('SAI_TARGET_INVOKER_PARTY', 16); // Invoker's party members +define('SAI_TARGET_PLAYER_RANGE', 17); // (Random?) player within specified range. +define('SAI_TARGET_PLAYER_DISTANCE', 18); // (Random?) player within specified distance. (Different from #17?) +define('SAI_TARGET_CLOSEST_CREATURE', 19); // Closest creature with specified ID within specified range. +define('SAI_TARGET_CLOSEST_GAMEOBJECT', 20); // Closest object with specified ID within specified range. +define('SAI_TARGET_CLOSEST_PLAYER', 21); // Closest player within specified range. +define('SAI_TARGET_ACTION_INVOKER_VEHICLE', 22); // Unit's vehicle who caused this Event to occur +define('SAI_TARGET_OWNER_OR_SUMMONER', 23); // Unit's owner or summoner +define('SAI_TARGET_THREAT_LIST', 24); // All units on creature's threat list +define('SAI_TARGET_CLOSEST_ENEMY', 25); // Any attackable target (creature or player) within maxDist +define('SAI_TARGET_CLOSEST_FRIENDLY', 26); // Any friendly unit (creature, player or pet) within maxDist +define('SAI_TARGET_LOOT_RECIPIENTS', 27); // All tagging players +define('SAI_TARGET_FARTHEST', 28); // Farthest unit on the threat list +define('SAI_TARGET_VEHICLE_ACCESSORY', 29); // Vehicle can target unit in given seat + +define('SAI_TEMPLATE_BASIC', 0); // +define('SAI_TEMPLATE_CASTER', 1); // +JOIN: target_param1 as castFlag +define('SAI_TEMPLATE_TURRET', 2); // +JOIN: target_param1 as castflag +define('SAI_TEMPLATE_PASSIVE', 3); // +define('SAI_TEMPLATE_CAGED_GO_PART', 4); // +define('SAI_TEMPLATE_CAGED_NPC_PART', 5); // + // profiler queue interactions define('PR_QUEUE_STATUS_ENDED', 0); define('PR_QUEUE_STATUS_WAITING', 1); diff --git a/includes/kernel.php b/includes/kernel.php index d2f0a283..7ffd0b7a 100644 --- a/includes/kernel.php +++ b/includes/kernel.php @@ -26,6 +26,7 @@ require_once 'includes/markup.class.php'; // manipulate markup require_once 'includes/database.class.php'; // wrap DBSimple require_once 'includes/community.class.php'; // handle comments, screenshots and videos require_once 'includes/loot.class.php'; // build lv-tabs containing loot-information +require_once 'includes/smartAI.class.php'; require_once 'localization/lang.class.php'; require_once 'pages/genericPage.class.php'; diff --git a/includes/smartAI.class.php b/includes/smartAI.class.php new file mode 100644 index 00000000..8641e1d1 --- /dev/null +++ b/includes/smartAI.class.php @@ -0,0 +1,1299 @@ +srcType = $srcType; + $this->entry = $entry; + $this->miscData = $miscData; + + $raw = DB::World()->select('SELECT id, link, event_type, event_phase_mask, event_chance, event_flags, event_param1, event_param2, event_param3, event_param4, action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, target_type, target_param1, target_param2, target_param3, target_x, target_y, target_z, target_o FROM smart_scripts WHERE entryorguid = ?d AND source_type = ?d ORDER BY id ASC', $this->entry, $this->srcType); + foreach ($raw as $r) + { + $this->rawData[$r['id']] = array( + 'id' => $r['id'], + 'link' => $r['link'], + 'event' => array( + 'type' => $r['event_type'], + 'phases' => Util::mask2bits($r['event_phase_mask'], 1) ?: [0], + 'chance' => $r['event_chance'], + 'flags' => $r['event_flags'], + 'param' => [$r['event_param1'], $r['event_param2'], $r['event_param3'], $r['event_param4'], 0] + ), + 'action' => array( + 'type' => $r['action_type'], + 'param' => [$r['action_param1'], $r['action_param2'], $r['action_param3'], $r['action_param4'], $r['action_param5'], $r['action_param6']] + ), + 'target' => array( + 'type' => $r['target_type'], + 'param' => [$r['target_param1'], $r['target_param2'], $r['target_param3']], + 'pos' => [$r['target_x'], $r['target_y'], $r['target_z'], $r['target_o']] + ) + ); + } + } + + public function prepare() : bool + { + if (!$this->rawData) + return false; + + if ($this->result) + return true; + + $hidePhase = + $hideChance = true; + + foreach ($this->iterate() as $_) + { + $this->rowKey = Util::createHash(8); + + if ($ts = $this->getTalkSource()) + $this->getQuotes($ts); + + list($evtBody, $evtFooter) = $this->event(); + list($actBody, $actFooter) = $this->action(); + + if ($ef = $this->eventFlags()) + { + if ($evtFooter) + $evtFooter = $ef.', '.$evtFooter; + else + $evtFooter = $ef; + } + + if ($this->itr['event']['phases'] != [0]) + $hidePhase = false; + + if ($this->itr['event']['chance'] != 100) + $hideChance = false; + + $this->result[] = array( + $this->itr['id'], + implode(', ', $this->itr['event']['phases']), + $evtBody.($evtFooter ? '[div float=right margin=0px][i][small class=q0]'.$evtFooter.'[/small][/i][/div]' : null), + $this->itr['event']['chance'].'%', + $actBody.($actFooter ? '[div float=right margin=0px clear=both][i][small class=q0]'.$actFooter.'[/small][/i][/div]' : null) + ); + } + + $th = array( + '#' => 16, + 'Phase' => 32, + 'Event' => 350, + 'Chance' => 24, + 'Action' => 0 + ); + + if ($hidePhase) + { + unset($th['Phase']); + foreach ($this->result as &$r) + unset($r[1]); + } + unset($r); + + if ($hideChance) + { + unset($th['Chance']); + foreach ($this->result as &$r) + unset($r[3]); + } + unset($r); + + $tbl = '[tr]'; + foreach ($th as $n => $w) + $tbl .= '[td header '.($w ? 'width='.$w.'px' : null).']'.$n.'[/td]'; + $tbl .= '[/tr]'; + + foreach ($this->result as $r) + $tbl .= '[tr][td]'.implode('[/td][td]', $r).'[/td][/tr]'; + + if ($this->srcType == SAI_SRC_TYPE_ACTIONLIST) + $this->tabs[$this->entry] = $tbl; + else + $this->tabs[0] = $tbl; + + return true; + } + + public function getMarkdown() : string + { + # id | event (footer phase) | chance | action + target + + if (!$this->rawData) + return ''; + + $return = '[style]#text-generic .grid { clear:left; } #text-generic .tabbed-contents { padding:0px; clear:left; }[/style][pad][h3][toggler id=sai]SmartAI'.(!empty($this->miscData['title']) ? $this->miscData['title'] : null).'[/toggler][/h3][div id=sai clear=left]%s[/div]'; + if (count($this->tabs) > 1) + { + $wrapper = '[tabs name=sai width=942px]%s[/tabs]'; + $tabs = ''; + foreach ($this->tabs as $guid => $data) + { + $buff = '[tab name=\"'.($guid ? 'ActionList #'.$guid : 'Main').'\"][table class=grid width=940px]'.$data.'[/table][/tab]'; + if ($guid) + $tabs .= $buff; + else + $tabs = $buff . $tabs; + } + + return sprintf($return, sprintf($wrapper, $tabs)); + } + else + return sprintf($return, '[table class=grid width=940px]'.$this->tabs[0].'[/table]'); + } + + public function getJSGlobals() : array + { + return $this->jsGlobals; + } + + public function getTabs() : array + { + return $this->tabs; + } + + private function &iterate() : iterable + { + while (list($id, $_) = each($this->rawData)) + { + $this->itr = &$this->rawData[$id]; + + yield $this->itr; + } + } + + private function numRange(string $f, int $n, bool $isTime = false) : string + { + if (!isset($this->itr[$f]['param'][$n]) || !isset($this->itr[$f]['param'][$n + 1])) + return 0; + + if (empty($this->itr[$f]['param'][$n]) && empty($this->itr[$f]['param'][$n + 1])) + return 0; + + $str = $isTime ? Util::formatTime($this->itr[$f]['param'][$n], true) : $this->itr[$f]['param'][$n]; + if ($this->itr[$f]['param'][$n + 1] > $this->itr[$f]['param'][$n]) + $str .= ' – '.($isTime ? Util::formatTime($this->itr[$f]['param'][$n + 1], true) : $this->itr[$f]['param'][$n + 1]); + + return $str; + } + + private function getQuotes(int $creatureId) : void + { + if (isset($this->quotes[$creatureId])) + return; + + $quoteSrc = DB::World()->select(' + SELECT + ct.CreatureID, ct.GroupID, ct.ID, ct.`Type`, + ct.TextRange AS `range`, + IFNULL(bct.`Language`, ct.`Language`) AS lang, + IFNULL(NULLIF(bct.MaleText, ""), IFNULL(NULLIF(bct.FemaleText, ""), IFNULL(ct.`Text`, ""))) AS text_loc0, + {IFNULL(NULLIF(bctl.MaleText, ""), IFNULL(NULLIF(bctl.FemaleText, ""), IFNULL(ctl.Text, ""))) AS text_loc?d,} + IF(bct.SoundId > 0, bct.SoundId, ct.Sound) AS soundId + FROM + creature_text ct + {LEFT JOIN + creature_text_locale ctl ON ct.CreatureID = ctl.CreatureID AND ct.GroupID = ctl.GroupID AND ct.ID = ctl.ID AND ctl.Locale = ?} + LEFT JOIN + broadcast_text bct ON ct.BroadcastTextId = bct.ID + {LEFT JOIN + broadcast_text_locale bctl ON ct.BroadcastTextId = bctl.ID AND bctl.locale = ?} + WHERE + ct.CreatureID = ?d', + User::$localeId ?: DBSIMPLE_SKIP, + User::$localeId ? Util::$localeStrings[User::$localeId] : DBSIMPLE_SKIP, + User::$localeId ? Util::$localeStrings[User::$localeId] : DBSIMPLE_SKIP, + $creatureId + ); + + foreach ($quoteSrc as $text) + { + $msg = Util::localizedString($text, 'text'); + if (!$msg) + continue; + + // fixup .. either set %s for emotes or dont >.< + if (in_array($text['Type'], [2, 16]) && strpos($msg, '%s') === false) + $msg = '%s '.$msg; + + // fixup: bad case-insensivity + $msg = str_replace('%S', '%s', $msg); + + $line = array( + 'range' => $text['range'], + 'type' => 2, // [type: 0, 12] say: yellow-ish + 'lang' => !empty($text['lang']) ? Lang::game('languages', $text['lang']) : null, + 'text' => Util::parseHtmlText(htmlentities($msg), true) + ); + + switch ($text['Type']) + { + case 1: // yell: + case 14: $line['type'] = 1; break; // - dark red + case 2: // emote: + case 16: // " + case 3: // boss emote: + case 41: $line['type'] = 4; break; // - orange + case 4: // whisper: + case 15: // " + case 5: // boss whisper: + case 42: $line['type'] = 3; break; // - pink-ish + } + + $this->quotes[$text['CreatureID']][$text['GroupID']][] = $line; + } + + if (isset($this->quotes[$text['CreatureID']])) + $this->quotes[$text['CreatureID']]['src'] = Util::jsEscape(CreatureList::getName($text['CreatureID'])); + } + + private function getTalkSource() : int + { + if ($this->itr['action']['type'] != SAI_ACTION_TALK && + $this->itr['action']['type'] != SAI_ACTION_SIMPLE_TALK) + return 0; + + switch ($this->itr['target']['type']) + { + case SAI_TARGET_CREATURE_GUID: + if ($id = DB::World()->selectCell('SELECT id FROM creature WHERE guid = ?d', $this->itr['target']['param'][0])) + return $id; + + break; + case SAI_TARGET_CREATURE_RANGE: + case SAI_TARGET_CREATURE_DISTANCE: + case SAI_TARGET_CLOSEST_CREATURE: + return $this->itr['target']['param'][0]; + case SAI_TARGET_SELF: + case SAI_TARGET_ACTION_INVOKER: + case SAI_TARGET_CLOSEST_PLAYER: + case SAI_TARGET_CLOSEST_FRIENDLY: // unsure about this + default: + return empty($this->miscData['baseEntry']) ? $this->entry : $this->miscData['baseEntry']; + } + + return 0; + } + + private function eventFlags() : string + { + $ef = []; + for ($i = 1; $i <= SAI_EVENT_FLAG_WHILE_CHARMED; $i <<= 1) + if ($this->itr['event']['flags'] & $i) + if ($x = Lang::smartAI('eventFlags', $i)) + $ef[] = $x; + + return Lang::concat($ef); + } + + private function castFlags(string $f, int $n) : string + { + $cf = []; + for ($i = 1; $i <= SAI_CAST_FLAG_COMBAT_MOVE; $i <<= 1) + if ($this->itr[$f]['param'][$n] & $i) + if ($x = Lang::smartAI('castFlags', $i)) + $cf[] = $x; + + return Lang::concat($cf); + } + + private function npcFlags(string $f, int $n) : string + { + $nf = []; + for ($i = 1; $i <= NPC_FLAG_MAILBOX; $i <<= 1) + if ($this->itr[$f]['param'][$n] & $i) + if ($x = Lang::npc('npcFlags', $i)) + $nf[] = $x; + + return Lang::concat($nf ?: [Lang::smartAI('empty')]); + } + + private function unitFlags(string $f, int $n) : string + { + $uf = []; + for ($i = 1; $i <= UNIT_FLAG_UNK_31; $i <<= 1) + if ($this->itr[$f]['param'][$n] & $i) + if ($x = Lang::unit('flags', $i)) + $uf[] = $x; + + return Lang::concat($uf ?: [Lang::smartAI('empty')]); + } + + private function unitFlags2(string $f, int $n) : string + { + $uf = []; + for ($i = 1; $i <= UNIT_FLAG2_ALLOW_CHEAT_SPELLS; $i <<= 1) + if ($this->itr[$f]['param'][$n] & $i) + if ($x = Lang::unit('flags2', $i)) + $uf[] = $x; + + return Lang::concat($uf ?: [Lang::smartAI('empty')]); + } + + private function unitFieldBytes1(int $idx, int $val) : string + { + if ($idx === 0) + { + if ($standState = Lang::unit('bytes1', $idx, $val)) + return $standState; + else + return Lang::unit('bytes1', 'valueUNK', [$val, $idx]); + } + else if ($idx === 2 || $idx == 3) + { + $buff = []; + for ($i = 1; $i <= 0x10; $i <<= 1) + if ($val & $i) + if ($x = Lang::unit('bytes1', $idx, $val)) + $buff[] = $x; + + return $buff ? Lang::concat($buff) : Lang::unit('bytes1', 'valueUNK', [$val, $idx]); + } + else + return Lang::unit('bytes1', 'idxUNK', [$idx]); + } + + private function summonType(int $summonType) : string + { + if ($summonType = Lang::smartAI('summonTypes', $summonType)) + return $summonType; + else + return Lang::smartAI('summonType', 'summonTypeUNK', [$summonType]); + } + + private function dynFlags(string $f, int $n) : string + { + $df = []; + for ($i = 1; $i <= UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST; $i <<= 1) + if ($this->itr[$f]['param'][$n] & $i) + if ($x = Lang::unit('dynFlags', $i)) + $df[] = $x; + + return Lang::concat($df ?: [Lang::smartAI('empty')]); + } + + private function goFlags(string $f, int $n) : string + { + $gf = []; + for ($i = 1; $i <= GO_FLAG_DESTROYED; $i <<= 1) + if ($this->itr[$f]['param'][$n] & $i) + if ($x = Lang::gameObject('goFlags', $i)) + $gf[] = $x; + + return Lang::concat($gf ?: [Lang::smartAI('empty')]); + } + + private function aiTemplate(int $aiNum) : string + { + if ($standState = Lang::smartAI('aiTpl', $aiNum)) + return $standState; + else + return Lang::smartAI('aiTplUNK', [$aiNum]); + } + + private function reactState(int $stateNum) : string + { + if ($reactState = Lang::smartAI('reactStates', $stateNum)) + return $reactState; + else + return Lang::smartAI('reactStateUNK', [$stateNum]); + } + + private function target(array $override = []) : string + { + $target = ''; + + $t = $override ?: $this->itr['target']; + + $getDist = function ($min, $max) { return ($min && $max) ? min($min, $max).' – '.max($min, $max) : max($min, $max); }; + $tooltip = '[tooltip name=t-'.$this->rowKey.']'.Lang::smartAI('targetTT', array_merge([$t['type']], $t['param'], $t['pos'])).'[/tooltip][span class=tip tooltip=t-'.$this->rowKey.']%s[/span]'; + + // additional parameters + $t['param'][3] = ''; + + switch ($t['type']) + { + // direct param use + case SAI_TARGET_SELF: // 1 + case SAI_TARGET_VICTIM: // 2 + case SAI_TARGET_HOSTILE_SECOND_AGGRO: // 3 + case SAI_TARGET_HOSTILE_LAST_AGGRO: // 4 + case SAI_TARGET_HOSTILE_RANDOM: // 5 + case SAI_TARGET_HOSTILE_RANDOM_NOT_TOP: // 6 + case SAI_TARGET_ACTION_INVOKER: // 7 + case SAI_TARGET_POSITION: // 8 + case SAI_TARGET_STORED: // 12 + case SAI_TARGET_INVOKER_PARTY: // 16 + case SAI_TARGET_CLOSEST_PLAYER: // 21 + case SAI_TARGET_ACTION_INVOKER_VEHICLE: // 22 + case SAI_TARGET_OWNER_OR_SUMMONER: // 23 + case SAI_TARGET_THREAT_LIST: // 24 + case SAI_TARGET_CLOSEST_ENEMY: // 25 + case SAI_TARGET_CLOSEST_FRIENDLY: // 26 + case SAI_TARGET_LOOT_RECIPIENTS: // 27 + case SAI_TARGET_FARTHEST: // 28 + case SAI_TARGET_VEHICLE_ACCESSORY: // 29 + break; + // distance + case SAI_TARGET_PLAYER_RANGE: // 17 + $t['param'][3] = $getDist($t['param'][0], $t['param'][1]); + break; + case SAI_TARGET_PLAYER_DISTANCE: // 18 + $t['param'][3] = $getDist(0, $t['param'][0]); + break; + // creature link + case SAI_TARGET_CREATURE_RANGE: // 9 + if ($t['param'][0]) + $this->jsGlobals[TYPE_NPC][] = $t['param'][0]; + + $t['param'][3] = $getDist($t['param'][1], $t['param'][2]); + break; + case SAI_TARGET_CREATURE_GUID: // 10 + if ($t['param'][3] = DB::World()->selectCell('SELECT id FROM creature WHERE guid = ?d', $t['param'][0])) + $this->jsGlobals[TYPE_NPC][] = $t['param'][3]; + else + trigger_error('SmartAI::resloveTarget - creature with guid '.$t['param'][0].' not in DB'); + break; + case SAI_TARGET_CREATURE_DISTANCE: // 11 + case SAI_TARGET_CLOSEST_CREATURE: // 19 + $t['param'][3] = $getDist(0, $t['param'][1]); + + if ($t['param'][0]) + $this->jsGlobals[TYPE_NPC][] = $t['param'][0]; + break; + // gameobject link + case SAI_TARGET_GAMEOBJECT_GUID: // 14 + if ($t['param'][3] = DB::World()->selectCell('SELECT id FROM gameobject WHERE guid = ?d', $t['param'][0])) + $this->jsGlobals[TYPE_OBJECT][] = $t['param'][3]; + else + trigger_error('SmartAI::resloveTarget - gameobject with guid '.$t['param'][0].' not in DB'); + break; + case SAI_TARGET_GAMEOBJECT_RANGE: // 13 + $t['param'][3] = $getDist($t['param'][1], $t['param'][2]); + + if ($t['param'][0]) + $this->jsGlobals[TYPE_OBJECT][] = $t['param'][0]; + break; + case SAI_TARGET_GAMEOBJECT_DISTANCE: // 15 + case SAI_TARGET_CLOSEST_GAMEOBJECT: // 20 + $t['param'][3] = $getDist(0, $t['param'][1]); + + if ($t['param'][0]) + $this->jsGlobals[TYPE_OBJECT][] = $t['param'][0]; + break; + // error + default: + $target = lang::smartAI('targetUNK', [$t['type']]); + } + + $target = $target ?: Lang::smartAI('targets', $t['type'], $t['param']); + + // resolve conditionals + $target = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):([^;]*);/i', function ($m) { return $m[1] ? $m[2] : $m[3]; }, $target); + + // wrap in tooltip (suspend action-tooltip) + return '[/span]'.sprintf($tooltip, $target).'[span tooltip=a-'.$this->rowKey.']'; + } + + private function event() : array + { + $body = + $footer = ''; + + $e = &$this->itr['event']; + + $tooltip = '[tooltip name=e-'.$this->rowKey.']'.Lang::smartAI('eventTT', array_merge([$e['type'], $e['phases'], $e['chance'], $e['flags']], $e['param'])).'[/tooltip][span tooltip=e-'.$this->rowKey.']%s[/span]'; + + // additional parameters + $e['param'][5] = ''; + $e['param'][6] = ''; + + switch ($e['type']) + { + // simple + case SAI_EVENT_AGGRO: // 4 - On Creature Aggro + case SAI_EVENT_DEATH: // 6 - On Creature Death + case SAI_EVENT_EVADE: // 7 - On Creature Evade Attack + case SAI_EVENT_RESPAWN: // 11 - On Creature/Gameobject Respawn + case SAI_EVENT_REACHED_HOME: // 21 - On Creature Reached Home + case SAI_EVENT_RESET: // 25 - After Combat, On Respawn or Spawn + case SAI_EVENT_CHARMED: // 29 - On Creature Charmed + case SAI_EVENT_CHARMED_TARGET: // 30 - On Target Charmed + case SAI_EVENT_MOVEMENTINFORM: // 34 - WAYPOINT_MOTION_TYPE = 2, POINT_MOTION_TYPE = 8 + case SAI_EVENT_CORPSE_REMOVED: // 36 - On Creature Corpse Removed + case SAI_EVENT_AI_INIT: // 37 - + case SAI_EVENT_WAYPOINT_START: // 39 - On Creature Waypoint ID Started + case SAI_EVENT_WAYPOINT_REACHED: // 40 - On Creature Waypoint ID Reached + case SAI_EVENT_AREATRIGGER_ONTRIGGER: // 46 - + case SAI_EVENT_JUST_SUMMONED: // 54 - On Creature Just spawned + case SAI_EVENT_WAYPOINT_PAUSED: // 55 - On Creature Paused at Waypoint ID + case SAI_EVENT_WAYPOINT_RESUMED: // 56 - On Creature Resumed after Waypoint ID + case SAI_EVENT_WAYPOINT_STOPPED: // 57 - On Creature Stopped On Waypoint ID + case SAI_EVENT_WAYPOINT_ENDED: // 58 - On Creature Waypoint Path Ended + case SAI_EVENT_TIMED_EVENT_TRIGGERED: // 59 - + case SAI_EVENT_JUST_CREATED: // 63 - + case SAI_EVENT_GOSSIP_HELLO: // 64 - On Right-Click Creature/Gameobject that have gossip enabled. + case SAI_EVENT_FOLLOW_COMPLETED: // 65 - + case SAI_EVENT_GO_STATE_CHANGED: // 70 - + case SAI_EVENT_GO_EVENT_INFORM: // 71 - + case SAI_EVENT_ACTION_DONE: // 72 - + case SAI_EVENT_ON_SPELLCLICK: // 73 - + case SAI_EVENT_COUNTER_SET: // 77 - If the value of specified counterID is equal to a specified value + break; + // num range [+ time footer] + case SAI_EVENT_HEALT_PCT: // 2 - Health Percentage + case SAI_EVENT_MANA_PCT: // 3 - Mana Percentage + case SAI_EVENT_RANGE: // 9 - On Target In Range + case SAI_EVENT_TARGET_HEALTH_PCT: // 12 - On Target Health Percentage + case SAI_EVENT_TARGET_MANA_PCT: // 18 - On Target Mana Percentage + case SAI_EVENT_DAMAGED: // 32 - On Creature Damaged + case SAI_EVENT_DAMAGED_TARGET: // 33 - On Target Damaged + case SAI_EVENT_RECEIVE_HEAL: // 53 - On Creature Received Healing + case SAI_EVENT_FRIENDLY_HEALTH_PCT: // 74 - + $e['param'][5] = $this->numRange('event', 0); + // do not break; + case SAI_EVENT_OOC_LOS: // 10 - On Target In Distance Out of Combat + case SAI_EVENT_FRIENDLY_HEALTH: // 14 - On Friendly Health Deficit + case SAI_EVENT_FRIENDLY_MISSING_BUFF: // 16 - On Friendly Lost Buff + case SAI_EVENT_IC_LOS: // 26 - On Target In Distance In Combat + case SAI_EVENT_DATA_SET: // 38 - On Creature/Gameobject Data Set, Can be used with SMART_ACTION_SET_DATA + if ($time = $this->numRange('event', 2, true)) + $footer = $time; + break; + // SAI updates + case SAI_EVENT_UPDATE_IC: // 0 - In combat. + case SAI_EVENT_UPDATE_OOC: // 1 - Out of combat. + if ($this->srcType == SAI_SRC_TYPE_ACTIONLIST) + $e['param'][6] = 1; + // do not break; + case SAI_EVENT_UPDATE: // 60 - + $e['param'][5] = $this->numRange('event', 0, true); + if ($time = $this->numRange('event', 2, true)) + $footer = $time; + break; + case SAI_EVENT_KILL: // 5 - On Creature Kill + if ($time = $this->numRange('event', 0, true)) + $footer = $time; + + if ($e['param'][3] && !$e['param'][2]) + $this->jsGlobals[TYPE_NPC][] = $e['param'][3]; + break; + case SAI_EVENT_SPELLHIT: // 8 - On Creature/Gameobject Spell Hit + case SAI_EVENT_HAS_AURA: // 23 - On Creature Has Aura + case SAI_EVENT_TARGET_BUFFED: // 24 - On Target Buffed With Spell + case SAI_EVENT_SPELLHIT_TARGET: // 31 - On Target Spell Hit + if ($time = $this->numRange('event', 2, true)) + $footer = $time; + + if ($e['param'][1]) + $e['param'][5] = Lang::getMagicSchools($e['param'][1]); + + if ($e['param'][0]) + $this->jsGlobals[TYPE_SPELL][] = $e['param'][0]; + break; + case SAI_EVENT_VICTIM_CASTING: // 13 - On Target Casting Spell + if ($e['param'][2]) + $this->jsGlobals[TYPE_SPELL][$e['param'][2]]; + // do not break; + case SAI_EVENT_PASSENGER_BOARDED: // 27 - + case SAI_EVENT_PASSENGER_REMOVED: // 28 - + case SAI_EVENT_IS_BEHIND_TARGET: // 67 - On Creature is behind target. + if ($time = $this->numRange('event', 0, true)) + $footer = $time; + break; + case SAI_EVENT_SUMMONED_UNIT: // 17 - On Creature/Gameobject Summoned Unit + if ($e['param'][0]) + $this->jsGlobals[TYPE_NPC][] = $e['param'][0]; + // do not break; + case SAI_EVENT_FRIENDLY_IS_CC: // 15 - + case SAI_EVENT_SUMMON_DESPAWNED: // 35 - On Summoned Unit Despawned + if ($time = $this->numRange('event', 1, true)) + $footer = $time; + break; + case SAI_EVENT_ACCEPTED_QUEST: // 19 - On Target Accepted Quest + case SAI_EVENT_REWARD_QUEST: // 20 - On Target Rewarded Quest + if ($e['param'][0]) + $this->jsGlobals[TYPE_QUEST][] = $e['param'][0]; + break; + case SAI_EVENT_RECEIVE_EMOTE: // 22 - On Receive Emote. + $this->jsGlobals[TYPE_EMOTE][] = $e['param'][0]; + + if ($time = $this->numRange('event', 1, true)) + $footer = $time; + break; + case SAI_EVENT_TEXT_OVER: // 52 - On TEXT_OVER Event Triggered After SMART_ACTION_TALK + if ($e['param'][1]) + $this->jsGlobals[TYPE_NPC][] = $e['param'][1]; + break; + case SAI_EVENT_LINK: // 61 - Used to link together multiple events as a chain of events. + $e['param'][5] = LANG::concat(DB::World()->selectCol('SELECT CONCAT("#[b]", id, "[/b]") FROM smart_scripts WHERE link = ?d AND entryorguid = ?d AND source_type = ?d', $this->itr['id'], $this->entry, $this->srcType), false); + break; + case SAI_EVENT_GOSSIP_SELECT: // 62 - On gossip clicked (gossip_menu_option335). + $gmo = DB::World()->selectRow('SELECT gmo.OptionText AS text_loc0 {, gmol.OptionText AS text_loc?d} + FROM gossip_menu_option gmo LEFT JOIN gossip_menu_option_locale gmol ON gmo.MenuID = gmol.MenuID AND gmo.OptionID = gmol.OptionID AND gmol.Locale = ?d + WHERE gmo.MenuId = ?d AND gmo.OptionID = ?d', + User::$localeId ? Util::$localeStrings[User::$localeId] : DBSIMPLE_SKIP, + User::$localeId, + $e['param'][0], + $e['param'][1] + ); + + if ($gmo) + $e['param'][5] = Util::localizedString($gmo, 'text'); + else + trigger_error('SmartAI::event - could not find gossip menu option for event #'.$e['type']); + break; + case SAI_EVENT_GAME_EVENT_START: // 68 - On game_event started. + case SAI_EVENT_GAME_EVENT_END: // 69 - On game_event ended. + $this->jsGlobals[TYPE_WORLDEVENT][] = $e['param'][0]; + break; + case SAI_EVENT_DISTANCE_CREATURE: // 75 - On creature guid OR any instance of creature entry is within distance. + if ($e['param'][0]) + $e['param'][5] = DB::World()->selectCell('SELECT id FROM creature WHERE guid = ?d', $e['param'][0]); + // do not break; + case SAI_EVENT_DISTANCE_GAMEOBJECT: // 76 - On gameobject guid OR any instance of gameobject entry is within distance. + if ($e['param'][0] && !$e['param'][5]) + $e['param'][5] = DB::World()->selectCell('SELECT id FROM gameobject WHERE guid = ?d', $e['param'][0]); + else if ($e['param'][1]) + $e['param'][5] = $e['param'][1]; + else if (!$e['param'][5]) + trigger_error('SmartAI::event - entity for event #'.$e['type'].' not defined'); + + if ($e['param'][5]) + $this->jsGlobals[TYPE_NPC][] = $e['param'][5]; + + if ($e['param'][3]) + $footer = Util::foramtTime($e['param'][3], true); + break; + case SAI_EVENT_EVENT_PHASE_CHANGE: // 66 - On event phase mask set + $e['param'][5] = Lang::concat(Util::mask2bits($a['param'][0]), false); + break; + default: + $body = '[span class=q10]Unhandled Event[/span] #'.$e['type']; + } + + $body = $body ?: Lang::smartAI('events', $e['type'], 0, $e['param']); + if ($footer) + $footer = Lang::smartAI('events', $e['type'], 1, (array)$footer); + + // resolve conditionals + $footer = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):([^;]*);/i', function ($m) { return $m[1] ? $m[2] : $m[3]; }, $footer); + $body = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):([^;]*);/i', function ($m) { return $m[1] ? $m[2] : $m[3]; }, $body); + $body = str_replace('#target#', $this->target(), $body); + + // wrap body in tooltip + return [sprintf($tooltip, $body), $footer]; + } + + private function action() : array + { + $body = + $footer = ''; + + $a = &$this->itr['action']; + + $tooltip = '[tooltip name=a-'.$this->rowKey.']'.Lang::smartAI('actionTT', array_merge([$a['type']], $a['param'])).'[/tooltip][span tooltip=a-'.$this->rowKey.']%s[/span]'; + + // additional parameters + $a['param'][6] = ''; + $a['param'][7] = ''; + $a['param'][8] = ''; + $a['param'][9] = ''; + + switch ($a['type']) + { + // simple + case SAI_ACTION_ACTIVATE_GOBJECT: // 9 -> any target + case SAI_ACTION_AUTO_ATTACK: // 20 -> any target + case SAI_ACTION_ALLOW_COMBAT_MOVEMENT: // 21 -> self + case SAI_ACTION_SET_EVENT_PHASE: // 22 -> any target + case SAI_ACTION_INC_EVENT_PHASE: // 23 -> any target + case SAI_ACTION_EVADE: // 24 -> any target + case SAI_ACTION_COMBAT_STOP: // 27 -> self + case SAI_ACTION_RANDOM_PHASE_RANGE: // 31 -> self + case SAI_ACTION_RESET_GOBJECT: // 32 -> any target + case SAI_ACTION_SET_INST_DATA: // 34 -> self, invoker, irrelevant + case SAI_ACTION_DIE: // 37 -> self + case SAI_ACTION_SET_IN_COMBAT_WITH_ZONE: // 38 -> self + case SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL: // 42 -> self + case SAI_ACTION_SET_DATA: // 45 -> any target + case SAI_ACTION_SET_VISIBILITY: // 47 -> any target + case SAI_ACTION_SET_ACTIVE: // 48 -> any target + case SAI_ACTION_ATTACK_START: // 49 -> any target + case SAI_ACTION_KILL_UNIT: // 51 -> any target + case SAI_ACTION_SET_RUN: // 59 -> self + case SAI_ACTION_SET_DISABLE_GRAVITY: // 60 -> self + case SAI_ACTION_SET_SWIM: // 61 -> self + case SAI_ACTION_SET_COUNTER: // 63 -> any target + case SAI_ACTION_STORE_TARGET_LIST: // 64 -> any target + case SAI_ACTION_WP_RESUME: // 65 -> self + case SAI_ACTION_PLAYMOVIE: // 68 -> invoker + case SAI_ACTION_CLOSE_GOSSIP: // 72 -> any target .. doesn't matter though + case SAI_ACTION_TRIGGER_TIMED_EVENT: // 73 -> self + case SAI_ACTION_REMOVE_TIMED_EVENT: // 74 -> self + case SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT: // 76 -> any?? + case SAI_ACTION_RESET_SCRIPT_BASE_OBJECT: // 77 -> self + case SAI_ACTION_CALL_SCRIPT_RESET: // 78 -> self + case SAI_ACTION_SET_RANGED_MOVEMENT: // 79 -> self + case SAI_ACTION_RANDOM_MOVE: // 89 -> any target + case SAI_ACTION_SEND_GO_CUSTOM_ANIM: // 93 -> self + case SAI_ACTION_SEND_GOSSIP_MENU: // 98 -> invoker + case SAI_ACTION_SEND_TARGET_TO_TARGET: // 100 -> any target + case SAI_ACTION_SET_HEALTH_REGEN: // 102 -> any target + case SAI_ACTION_SET_ROOT: // 103 -> any target + case SAI_ACTION_DISABLE_EVADE: // 117 -> self + case SAI_ACTION_SET_CAN_FLY: // 119 -> self + case SAI_ACTION_SET_SIGHT_DIST: // 121 -> any target + case SAI_ACTION_REMOVE_ALL_GAMEOBJECTS: // 126 -> any target + case SAI_ACTION_STOP_MOTION: // 127 -> any target [ye, not gonna resolve this nonsense] + break; + // simple type as param[0] + case SAI_ACTION_PLAY_EMOTE: // 5 -> any target + case SAI_ACTION_SET_EMOTE_STATE: // 17 -> any target + if ($a['param'][0]) + $this->jsGlobals[TYPE_EMOTE][] = $a['param'][0]; + break; + case SAI_ACTION_FAIL_QUEST: // 6 -> any target + case SAI_ACTION_OFFER_QUEST: // 7 -> invoker + case SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS:// 15 -> any target + case SAI_ACTION_CALL_GROUPEVENTHAPPENS: // 26 -> invoker + if ($a['param'][0]) + $this->jsGlobals[TYPE_QUEST][] = $a['param'][0]; + break; + case SAI_ACTION_REMOVEAURASFROMSPELL: // 28 -> any target + case SAI_ACTION_ADD_AURA: // 75 -> any target + if ($a['param'][0]) + $this->jsGlobals[TYPE_SPELL][] = $a['param'][0]; + break; + case SAI_ACTION_CALL_KILLEDMONSTER: // 33 -> any target + case SAI_ACTION_UPDATE_TEMPLATE: // 36 -> self + if ($a['param'][0]) + $this->jsGlobals[TYPE_NPC][] = $a['param'][0]; + break; + case SAI_ACTION_ADD_ITEM: // 56 -> invoker + case SAI_ACTION_REMOVE_ITEM: // 57 -> invoker + if ($a['param'][0]) + $this->jsGlobals[TYPE_ITEM][] = $a['param'][0]; + break; + case SAI_ACTION_GAME_EVENT_STOP: // 111 -> doesnt matter + case SAI_ACTION_GAME_EVENT_START: // 112 -> doesnt matter + if ($a['param'][0]) + $this->jsGlobals[TYPE_WORLDEVENT][] = $a['param'][0]; + break; + // simple preparse from param[0] to param[6] + case SAI_ACTION_SET_REACT_STATE: // 8 -> any target + $a['param'][6] = $this->reactState($a['param'][0]); + break; + case SAI_ACTION_SET_NPC_FLAG: // 81 -> any target + case SAI_ACTION_ADD_NPC_FLAG: // 82 -> any target + case SAI_ACTION_REMOVE_NPC_FLAG: // 83 -> any target + $a['param'][6] = $this->npcFlags('action', 0); + break; + case SAI_ACTION_SET_UNIT_FIELD_BYTES_1: // 90 -> any target + case SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1: // 91 -> any target + $a['param'][6] = $this->unitFieldBytes1($a['param'][1], $a['param'][0]); + break; + case SAI_ACTION_SET_DYNAMIC_FLAG: // 94 -> any target + case SAI_ACTION_ADD_DYNAMIC_FLAG: // 95 -> any target + case SAI_ACTION_REMOVE_DYNAMIC_FLAG: // 96 -> any target + $a['param'][6] = $this->dynFlags('action', 0); + break; + case SAI_ACTION_SET_GO_FLAG: // 104 -> any target + case SAI_ACTION_ADD_GO_FLAG: // 105 -> any target + case SAI_ACTION_REMOVE_GO_FLAG: // 106 -> any target + $a['param'][6] = $this->goFlags('action', 0); + break; + case SAI_ACTION_SET_POWER: // 108 -> any target + case SAI_ACTION_ADD_POWER: // 109 -> any target + case SAI_ACTION_REMOVE_POWER: // 110 -> any target + $a['param'][6] = Lang::spell('powerTypes', $a['param'][0]); + break; + // misc + case SAI_ACTION_TALK: // 1 -> any target + if ($src = $this->getTalkSource()) + { + if ($a['param'][6] = isset($this->quotes[$src][$a['param'][0]])) + { + $quotes = $this->quotes[$src][$a['param'][0]]; + foreach ($quotes as $key => $q) + { + $_ = ($q['type'] != 4 ? $this->quotes[$src]['src'].' '.Lang::npc('textTypes', $q['type']).Lang::main('colon').($q['lang'] ? '['.$q['lang'].'] ' : null) : null).html_entity_decode($q['text']); + $a['param'][7] .= '[div][span class=s'.$q['type'].']'.sprintf($_, $this->quotes[$src]['src']).'[/span][/div]'; + + if ($a['param'][1]) + $footer = [Util::formatTime($a['param'][1], true)]; + } + } + } + else + trigger_error('SmartAI::action - could not determine talk source for action #'.$a['type']); + + break; + case SAI_ACTION_SET_FACTION: // 2 -> any target + if ($a['param'][0]) + { + $a['param'][6] = DB::Aowow()->selectCell('SELECT factionId FROM ?_factiontemplate WHERE id = ?d', $a['param'][0]); + $this->jsGlobals[TYPE_FACTION][] = $a['param'][6]; + } + break; + case SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL: // 3 -> self + if ($a['param'][0]) + $this->jsGlobals[TYPE_NPC][] = $a['param'][0]; + else if (!$a['param'][1]) + $a['param'][6] = 1; + + break; + case SAI_ACTION_SOUND: // 4 -> self [param3 set in DB but not used in core?] + $this->jsGlobals[TYPE_SOUND][] = $a['param'][0]; + if ($a['param'][2]) + $footer = true; + + break; + case SAI_ACTION_RANDOM_EMOTE: // 10 -> any target + $buff = []; + for ($i = 0; $i < 6; $i++) + { + if (empty($a['param'][$i])) + continue; + + $buff[] = '[emote='.$a['param'][$i].']'; + $this->jsGlobals[TYPE_EMOTE][] = $a['param'][$i]; + } + $a['param'][6] = Lang::concat($buff, false); + break; + case SAI_ACTION_CAST: // 11 -> any target + $this->jsGlobals[TYPE_SPELL][] = $a['param'][0]; + if ($_ = $this->castFlags('action', 1)) + $footer = $_; + + break; + case SAI_ACTION_SUMMON_CREATURE: // 12 -> any target + $this->jsGlobals[TYPE_NPC][] = $a['param'][0]; + if ($a['param'][2]) + $a['param'][6] = Util::formatTime($a['param'][2]); + + $footer = $this->summonType($a['param'][1]); + break; + case SAI_ACTION_THREAT_SINGLE_PCT: // 13 -> victim + case SAI_ACTION_THREAT_ALL_PCT: // 14 -> self + case SAI_ACTION_ADD_THREAT: // 123 -> any target + $a['param'][6] = $a['param'][0] - $a['param'][1]; + break; + case SAI_ACTION_SET_UNIT_FLAG: // 18 -> any target + case SAI_ACTION_REMOVE_UNIT_FLAG: // 19 -> any target + $a['param'][6] = $a['param'][1] ? $this->unitFlags2('action', 0) : $this->unitFlags('action', 0); + break; + case SAI_ACTION_FLEE_FOR_ASSIST: // 25 -> none + case SAI_ACTION_CALL_FOR_HELP: // 39 -> self + if ($a['param'][0]) + $footer = true; + break; + case SAI_ACTION_FOLLOW: // 29 -> any target [what the heck are param 4 & 5] + $this->jsGlobals[TYPE_NPC][] = $a['param'][2]; + if ($a['param'][1]) + $a['param'][6] = Util::O2Deg($a['param'][1])[0]; + if ($a['param'][3] || $a['param'][4]) + $a['param'][7] = 1; + + if ($a['param'][6] || $a['param'][7]) + $footer = true; + + break; + case SAI_ACTION_RANDOM_PHASE: // 30 -> self + $buff = []; + for ($i = 0; $i < 7; $i++) + if ($_ = $a['param'][$i]) + $buff[] = $_; + + $a['param'][6] = Lang::concat($buff); + break; + case SAI_ACTION_SET_SHEATH: // 40 -> self + if ($sheath = Lang::smartAI('sheaths', $a['param'][0])) + $a['param'][6] = $sheath; + else + $a['param'][6] = lang::smartAI('sheathUNK', $a['param'][0]); + + break; + case SAI_ACTION_FORCE_DESPAWN: // 41 -> any target + $a['param'][6] = Util::formatTime($a['param'][0], true); + $a['param'][7] = Util::formatTime($a['param'][1] * 1000, true); + break; + case SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL: // 43 -> self + if ($a['param'][0]) + $this->jsGlobals[TYPE_NPC][] = $a['param'][0]; + else if (!$a['param'][1]) + $a['param'][6] = 1; + break; + case SAI_ACTION_SET_INGAME_PHASE_MASK: // 44 -> any target + $a['param'][6] = $a['param'][0] ? Lang::concat(Util::mask2bits($a['param'][0])) : 0; + break; + case SAI_ACTION_SUMMON_GO: // 50 -> self, world coords + $this->jsGlobals[TYPE_OBJECT][] = $a['param'][0]; + $a['param'][6] = Util::formatTime($a['param'][1] * 1000, true); + + if (!$a['param'][2]) + $footer = true; + + break; + case SAI_ACTION_ACTIVATE_TAXI: // 52 -> invoker + $nodes = DB::Aowow()->selectRow(' + SELECT tn1.name_loc0 AS start_loc0, tn1.name_loc?d AS start_loc?d, tn2.name_loc0 AS end_loc0, tn2.name_loc?d AS end_loc?d + FROM ?_taxipath tp + JOIN ?_taxinodes tn1 ON tp.startNodeId = tn1.id + JOIN ?_taxinodes tn2 ON tp.endNodeId = tn2.id + WHERE tp.id = ?d', + User::$localeId, User::$localeId, User::$localeId, User::$localeId, $a['param'][0] + ); + $a['param'][6] = Util::localizedString($nodes, 'start'); + $a['param'][7] = Util::localizedString($nodes, 'end'); + break; + case SAI_ACTION_WP_START: // 53 -> any .. why tho? + $a['param'][7] = $this->reactState($a['param'][5]); + if ($a['param'][3]) + $this->jsGlobals[TYPE_QUEST][] = $a['param'][3]; + if ($a['param'][4]) + $a['param'][6] = Util::formatTime($a['param'][4]); + if ($a['param'][2]) + $footer = true; + + break; + case SAI_ACTION_WP_PAUSE: // 54 -> self + $a['param'][6] = Util::formatTime($a['param'][0]); + break; + case SAI_ACTION_WP_STOP: // 55 -> self + if ($a['param'][0]) + $a['param'][6] = Util::formatTime($a['param'][0], true); + + if ($a['param'][1]) + { + $this->jsGlobals[TYPE_QUEST][] = $a['param'][1]; + $a['param'][$a['param'][2] ? 7 : 8] = 1; + } + + break; + case SAI_ACTION_INSTALL_AI_TEMPLATE: // 58 -> self + $a['param'][6] = $this->aiTemplate($a['param'][0]); + break; + case SAI_ACTION_TELEPORT: // 62 -> invoker [resolved coords already stored in areatrigger entry] + $a['param'][6] = $this->miscData['teleportA']; + $this->jsGlobals[TYPE_ZONE][] = $a['param'][6]; + break; + case SAI_ACTION_SET_ORIENTATION: // 66 -> any target + if ($this->itr['target']['type'] == SAI_TARGET_POSITION) + $a['param'][6] = Util::O2Deg($this->itr['target']['pos'][3])[1]; + else if ($this->itr['target']['type'] != SAI_TARGET_SELF) + $a['param'][6] = '#target#'; + break; + case SAI_ACTION_CREATE_TIMED_EVENT: // 67 -> self + $a['param'][6] = $this->numRange('action', 1, true); + $a['param'][7] = ($a['param'][5] < 100); + if ($repeat = $this->numRange('action', 3, true)) + $footer = [$repeat]; + break; + case SAI_ACTION_MOVE_TO_POS: // 69 -> any target + if ($a['param'][2]) + $footer = true; + break; + case SAI_ACTION_ENABLE_TEMP_GOBJ: // 70 -> any target + case SAI_ACTION_SET_CORPSE_DELAY: // 116 -> ??? + case SAI_ACTION_FLEE: // 122 -> any target + $a['param'][6] = Util::formatTime($a['param'][0] * 1000, true); + break; + case SAI_ACTION_EQUIP: // 71 -> any + $buff = []; + if ($a['param'][0]) + { + $slots = [1, 2, 3]; + if ($a['param'][1]) + $slots = Util::mask2bits($a['param'][1], 1); + + $items = DB::World()->selectRow('SELECT ItemID1, ItemID2, ItemID3 FROM creature_equip_template WHERE CreatureID = ?d AND ID = ?d', $this->miscData['baseEntry'] ?: $this->entry, $a['param'][0]); + foreach ($items as $i) + $this->jsGlobals[TYPE_ITEM][] = $i; + + foreach ($slots as $s) + if ($_ = $items['ItemID'.$s]) + $buff[] = '[item='.$_.']'; + } + else if ($a['param'][2] || $a['param'][3] || $a['param'][4]) + { + if ($_ = $a['param'][2]) + { + $this->jsGlobals[TYPE_ITEM][] = $_; + $buff[] = '[item='.$_.']'; + } + if ($_ = $a['param'][3]) + { + $this->jsGlobals[TYPE_ITEM][] = $_; + $buff[] = '[item='.$_.']'; + } + if ($_ = $a['param'][4]) + { + $this->jsGlobals[TYPE_ITEM][] = $_; + $buff[] = '[item='.$_.']'; + } + } + else + $a['param'][7] = 1; + + $a['param'][6] = Lang::concat($buff); + + $footer = true; + + break; + case SAI_ACTION_CALL_TIMED_ACTIONLIST: // 80 -> any target + switch ($a['param'][1]) + { + case 0: + case 1: + case 2: + $a['param'][6] = Lang::smartAI('saiUpdate', $a['param'][1]); + break; + default: + $a['param'][6] = Lang::smartAI('saiUpdateUNK', [$a['param'][1]]); + } + + $tal = new SmartAI(SAI_SRC_TYPE_ACTIONLIST, $a['param'][0], array_merge(['baseEntry' => $this->entry], $this->miscData)); + $tal->prepare(); + foreach ($tal->getJSGlobals() as $type => $data) + { + if (empty($this->jsGlobals[$type])) + $this->jsGlobals[$type] = []; + + $this->jsGlobals[$type] = array_merge($this->jsGlobals[$type], $data); + } + + foreach ($tal->getTabs() as $guid => $tt) + $this->tabs[$guid] = $tt; + + break; + case SAI_ACTION_SIMPLE_TALK: // 84 -> any target + if ($src = $this->getTalkSource()) + { + if (isset($this->quotes[$src][$a['param'][0]])) + { + $quotes = $this->quotes[$src][$a['param'][0]]; + foreach ($quotes as $key => $q) + { + $_ = ($q['type'] != 4 ? $this->quotes[$src]['src'].' '.Lang::npc('textTypes', $q['type']).Lang::main('colon').($q['lang'] ? '['.$q['lang'].'] ' : null) : null).html_entity_decode($q['text']); + $a['param'][6] .= '[div][span class=s'.$q['type'].']'.sprintf($_, $this->quotes[$src]['src']).'[/span][/div]'; + } + } + } + else + trigger_error('SmartAI::action - could not determine talk source for action #'.$a['type']); + + break; + case SAI_ACTION_CROSS_CAST: // 86 -> entity by TargetingBlock(param3, param4, param5, param6) cross cast spell at any target + $a['param'][6] = $this->target(array( + 'type' => $a['param'][2], + 'param' => [$a['param'][3], $a['param'][4], $a['param'][5]], + 'pos' => [0, 0, 0, 0] + )); + // do not break; + case SAI_ACTION_INVOKER_CAST: // 85 -> any target + $this->jsGlobals[TYPE_SPELL][] = $a['param'][0]; + if ($_ = $this->castFlags('action', 1)) + $footer = $_; + break; + case SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST: // 87 -> self + $talBuff = []; + for ($i = 0; $i < 6; $i++) + { + if (!$a['param'][$i]) + continue; + + $talBuff[] = '#'.$a['param'][$i].''; + + $tal = new SmartAI(SAI_SRC_TYPE_ACTIONLIST, $a['param'][$i], array_merge(['baseEntry' => $this->entry], $this->miscData)); + $tal->prepare(); + foreach ($tal->getJSGlobals() as $type => $data) + { + if (empty($this->jsGlobals[$type])) + $this->jsGlobals[$type] = []; + + $this->jsGlobals[$type] = array_merge($this->jsGlobals[$type], $data); + } + + foreach ($tal->getTabs() as $guid => $tt) + $this->tabs[$guid] = $tt; + } + $a['param'][6] = Lang::concat($talBuff, false); + break; + case SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST:// 88 -> self + $talBuff = []; + for ($i = $a['param'][0]; $i <= $a['param'][1]; $i++) + { + $talBuff[] = '#'.$i.''; + + $tal = new SmartAI(SAI_SRC_TYPE_ACTIONLIST, $i, array_merge(['baseEntry' => $this->entry], $this->miscData)); + $tal->prepare(); + foreach ($tal->getJSGlobals() as $type => $data) + { + if (empty($this->jsGlobals[$type])) + $this->jsGlobals[$type] = []; + + $this->jsGlobals[$type] = array_merge($this->jsGlobals[$type], $data); + } + + foreach ($tal->getTabs() as $guid => $tt) + $this->tabs[$guid] = $tt; + } + $a['param'][6] = Lang::concat($talBuff, false); + + break; + case SAI_ACTION_INTERRUPT_SPELL: // 92 -> self + if ($_ = $a['param'][1]) + $this->jsGlobals[TYPE_SPELL][] = $a['param'][1]; + + if ($a['param'][0] || $a['param'][2]) + $footer = [$a['param'][0]]; + + break; + case SAI_ACTION_SET_HOME_POS: // 101 -> self + if ($this->itr['target']['type'] == SAI_TARGET_SELF) + $a['param'][9] = 1; + // do not break; + case SAI_ACTION_JUMP_TO_POS: // 97 -> self + case SAI_ACTION_MOVE_OFFSET: // 114 -> self + $a['param'][6] = $this->itr['target']['pos'][0]; + $a['param'][7] = $this->itr['target']['pos'][1]; + $a['param'][8] = $this->itr['target']['pos'][2]; + break; + case SAI_ACTION_GO_SET_LOOT_STATE: // 99 -> any target + switch ($a['param'][0]) + { + case 0: + case 1: + case 2: + case 3: + $a['param'][6] = Lang::smartAI('lootStates', $a['param'][0]); + break; + default: + $a['param'][6] = Lang::smartAI('lootStateUNK', [$a['param'][0]]); + } + break; + + break; + case SAI_ACTION_SUMMON_CREATURE_GROUP: // 107 -> untargeted + if ($this->summons === null) + $this->summons = DB::World()->selectCol('SELECT groupId AS ARRAY_KEY, entry AS ARRAY_KEY2, COUNT(*) AS n FROM creature_summon_groups WHERE summonerId = ?d GROUP BY groupId, entry', empty($this->miscData['baseEntry']) ? $this->entry : $this->miscData['baseEntry']); + + $buff = []; + if (!empty($this->summons[$a['param'][0]])) + { + foreach ($this->summons[$a['param'][0]] as $id => $n) + { + $this->jsGlobals[TYPE_NPC][] = $id; + $buff[] = $n.'x [npc='.$id.']'; + } + } + + if ($buff) + $a['param'][6] = Lang::concat($buff); + + break; + case SAI_ACTION_START_CLOSEST_WAYPOINT: // 113 -> any target + $buff = []; + for ($i = 0; $i < 6; $i++) + if ($a['param'][$i]) + $buff[] = '#[b]'.$a['param'][$i].'[/b]'; + + $a['param'][6] = Lang::concat($buff, false); + break; + case SAI_ACTION_RANDOM_SOUND: // 115 -> self + for ($i = 0; $i < 4; $i++) + { + if ($x = $a['param'][$i]) + { + $this->jsGlobals[TYPE_SOUND][] = $x; + $a['param'][6] .= '[sound='.$x.']'; + } + } + + if ($a['param'][5]) + $footer = true; + + break; + case SAI_ACTION_GO_SET_GO_STATE: // 118 -> ??? + switch ($a['param'][0]) + { + case 0: + case 1: + case 2: + $a['param'][6] = Lang::smartAI('GOStates', $a['param'][0]); + break; + default: + $a['param'][6] = Lang::smartAI('GOStateUNK', [$a['param'][0]]); + } + break; + case SAI_ACTION_REMOVE_AURAS_BY_TYPE: // 120 -> any target + $a['param'][6] = Lang::spell('auras', $a['param'][0]); + break; + case SAI_ACTION_LOAD_EQUIPMENT: // 124 -> any target + $buff = []; + if ($a['param'][0]) + { + $items = DB::World()->selectRow('SELECT ItemID1, ItemID2, ItemID3 FROM creature_equip_template WHERE CreatureID = ?d AND ID = ?d', $this->miscData['baseEntry'] ?: $this->entry, $a['param'][0]); + foreach ($items as $i) + { + if (!$i) + continue; + + $this->jsGlobals[TYPE_ITEM][] = $i; + $buff[] = '[item='.$_.']'; + } + } + else if (!$a['param'][1]) + trigger_error('SmartAI::action - action #124 (SAI_ACTION_LOAD_EQIPMENT) is malformed'); + + $a['param'][6] = Lang::concat($buff); + $footer = true; + + break; + case SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT: // 125 -> self + $a['param'][6] = $this->numRange('action', 0); + break; + // todo (med): i know these exist, but have no info how they operate + case SAI_ACTION_SPAWN_SPAWNGROUP: // 131 + case SAI_ACTION_DESPAWN_SPAWNGROUP: // 132 + case SAI_ACTION_RESPAWN_BY_SPAWNID: // 133 + default: + $body = Lang::smartAI('actionUNK', [$a['type']]); + } + + $body = $body ?: Lang::smartAI('actions', $a['type'], 0, $a['param']); + if (gettype($footer) != 'string') + $footer = Lang::smartAI('actions', $a['type'], 1, (array)$footer); + + // resolve conditionals + $footer = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):([^;]*);/i', function ($m) { return $m[1] ? $m[2] : $m[3]; }, $footer); + $body = preg_replace_callback('/\(([^\)]*?)\)\?([^:]*):([^;]*);/i', function ($m) { return $m[1] ? $m[2] : $m[3]; }, $body); + $body = str_replace('#target#', $this->target(), $body); + + // wrap body in tooltip + return [sprintf($tooltip, $body), $footer]; + } +} + +?> diff --git a/includes/utilities.php b/includes/utilities.php index 2c771cf5..fe8c1aae 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -522,7 +522,7 @@ class Util } // pageText for Books (Item or GO) and questText - public static function parseHtmlText($text) + public static function parseHtmlText($text , $markdown = false) { if (stristr($text, '')) // text is basically a html-document with weird linebreak-syntax { @@ -531,7 +531,7 @@ class Util '' => '', '' => '', '' => '', - '

' => '
' + '

' => $markdown ? '[br]' : '
' ); // html may contain 'Pictures' and FlavorImages and "stuff" @@ -542,7 +542,7 @@ class Util ); } else - $text = strtr($text, ["\n" => '
', "\r" => '']); + $text = strtr($text, ["\n" => $markdown ? '[br]' : '
', "\r" => '']); $from = array( '/\|T([\w]+\\\)*([^\.]+)\.blp:\d+\|t/ui', // images (force size to tiny) |T:|t @@ -551,34 +551,45 @@ class Util '/\$t([^;]+);/ui', // nonsense, that the client apparently ignores '/\|\d\-?\d?\((\$\w)\)/ui', // and another modifier for something russian |3-6($r) '/<([^\"=\/>]+\s[^\"=\/>]+)>/ui', // emotes (workaround: at least one whitespace and never " or = between brackets) - '/\$(\d+)w/ui' // worldState(?)-ref found on some pageTexts $1234w + '/\$(\d+)w/ui', // worldState(?)-ref found on some pageTexts $1234w + '/\$c/i', // class-ref + '/\$r/i', // race-ref + '/\$n/i', // name-ref + '/\$b/i', // line break + '/\|n/i' // what .. the fuck .. another type of line terminator? (only in spanish though) ); - $to = array( + $toMD = array( + '[icon name=\2]', + '[span color=#\1>\2[/span]', + '<\1/\2>', + '', + '\1', + '<\1>', + '[span class=q0>WorldState #\1[/span]', + '<'.Lang::game('class').'>', + '<'.Lang::game('race').'>', + '<'.Lang::main('name').'>', + '[br]', + '' + ); + + $toHTML = array( '', '\2', '<\1/\2>', '', '\1', '<\1>', - 'WorldState #\1' + 'WorldState #\1', + '<'.Lang::game('class').'>', + '<'.Lang::game('race').'>', + '<'.Lang::main('name').'>', + '
', + '' ); - $text = preg_replace($from, $to, $text); - - $pairs = array( - '$c' => '<'.Lang::game('class').'>', - '$C' => '<'.Lang::game('class').'>', - '$r' => '<'.Lang::game('race').'>', - '$R' => '<'.Lang::game('race').'>', - '$n' => '<'.Lang::main('name').'>', - '$N' => '<'.Lang::main('name').'>', - '$b' => '
', - '$B' => '
', - '|n' => '' // what .. the fuck .. another type of line terminator? (only in spanish though) - ); - - return strtr($text, $pairs); + return preg_replace($from, $markdown ? $toMD : $toHTML, $text); } public static function asHex($val) @@ -1286,7 +1297,7 @@ class Util // subtract sockets if ($nSockets) { - // items by expantion overlap in this range. luckily highlevel raid items are exclusivly epic or better + // items by expansion overlap in this range. luckily highlevel raid items are exclusivly epic or better if ($itemLevel > 164 || ($itemLevel > 134 && $quality < ITEM_QUALITY_EPIC)) $score -= $nSockets * self::GEM_SCORE_BASE_WOTLK; else @@ -1460,7 +1471,7 @@ class Util if ($deg == 360) $deg = 0; - $dir = ['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW']; + $dir = Lang::game('orientation'); $desc = ''; foreach ($dir as $f => $d) { @@ -1479,6 +1490,23 @@ class Util return [(int)$deg, $desc]; } + + static function mask2bits($bitmask, $offset = 0) + { + $bits = []; + $i = 0; + while ($bitmask) + { + if ($bitmask & (1 << $i)) + { + $bitmask &= ~(1 << $i); + $bits[] = ($i + $offset); + } + $i++; + } + + return $bits; + } } ?> diff --git a/localization/lang.class.php b/localization/lang.class.php index 13ec162b..65a8fb2c 100644 --- a/localization/lang.class.php +++ b/localization/lang.class.php @@ -12,6 +12,8 @@ class Lang private static $profiler; private static $screenshot; private static $privileges; + private static $smartAI; + private static $unit; // types private static $achievement; diff --git a/localization/locale_dede.php b/localization/locale_dede.php index 3b91599a..9b96139e 100644 --- a/localization/locale_dede.php +++ b/localization/locale_dede.php @@ -336,6 +336,372 @@ $lang = array( "Ritter der Allianz / Klinge der Horde", "Feldkomandant / Feldherr", "Rittmeister / Sturmreiter", "Marschall / Kriegsherr", "Feldmarschall / Kriegsfürst", "Großmarschall / Oberster Kriegsfürst" ), + 'orientation' => ['Nord', 'Nordost', 'Ost', 'Südost', 'Süd', 'Südwest', 'West', 'Nordwest'] + ), + 'unit' => array( + 'flags' => array( + UNIT_FLAG_SERVER_CONTROLLED => 'Servergesteuert', + UNIT_FLAG_NON_ATTACKABLE => 'Nicht angreifbar', + UNIT_FLAG_REMOVE_CLIENT_CONTROL => 'Steuerung durch Client gesperrt', + UNIT_FLAG_PVP_ATTACKABLE => 'PvP-angreifbar', + UNIT_FLAG_RENAME => 'Umbenannt', + UNIT_FLAG_PREPARATION => 'Arenavorbereitung', + UNIT_FLAG_UNK_6 => 'UNK-6', + UNIT_FLAG_NOT_ATTACKABLE_1 => 'Nicht angreifbar', + UNIT_FLAG_IMMUNE_TO_PC => 'Immun gegen Spieler', + UNIT_FLAG_IMMUNE_TO_NPC => 'Immun gegen Kreaturen', + UNIT_FLAG_LOOTING => 'Lootanimation', + UNIT_FLAG_PET_IN_COMBAT => 'Pet im Kampf', + UNIT_FLAG_PVP => 'PvP', + UNIT_FLAG_SILENCED => 'Zum Schweigen gebracht', + UNIT_FLAG_CANNOT_SWIM => 'Kann nicht schwimmen', + UNIT_FLAG_UNK_15 => 'UNK-15 (kann nur schwimmen)', + UNIT_FLAG_UNK_16 => 'UNK-16 (kann nicht angreifen)', + UNIT_FLAG_PACIFIED => 'Befriedet', + UNIT_FLAG_STUNNED => 'Betäubt', + UNIT_FLAG_IN_COMBAT => 'Im Kampf', + UNIT_FLAG_TAXI_FLIGHT => 'Taxiflug', + UNIT_FLAG_DISARMED => 'Enwaffnet', + UNIT_FLAG_CONFUSED => 'Verwirrt', + UNIT_FLAG_FLEEING => 'Fiehend', + UNIT_FLAG_PLAYER_CONTROLLED => 'Spielergesteuert', + UNIT_FLAG_NOT_SELECTABLE => 'Nicht anwählbar', + UNIT_FLAG_SKINNABLE => 'Kürschnerbar', + UNIT_FLAG_MOUNT => 'Beritten', + UNIT_FLAG_UNK_28 => 'UNK-28', + UNIT_FLAG_UNK_29 => 'UNK-29 (Unterbinde Emotes)', + UNIT_FLAG_SHEATHE => 'Waffe eingesteckt', + UNIT_FLAG_UNK_31 => 'UNK-31' + ), + 'flags2' => array( + UNIT_FLAG2_FEIGN_DEATH => 'Totstellen', + UNIT_FLAG2_UNK1 => 'UNK-1 (unit model versteckt)', + UNIT_FLAG2_IGNORE_REPUTATION => 'Ignoriere Reputation', + UNIT_FLAG2_COMPREHEND_LANG => 'Verstehe Sprache', + UNIT_FLAG2_MIRROR_IMAGE => 'Spiegelbild', + UNIT_FLAG2_INSTANTLY_APPEAR_MODEL => 'Instant spawn', + UNIT_FLAG2_FORCE_MOVEMENT => 'Erzwinge Bewegung', + UNIT_FLAG2_DISARM_OFFHAND => 'Entwaffne Nebenhand', + UNIT_FLAG2_DISABLE_PRED_STATS => 'Vorausgesagte Statistiken deaktiviert', + UNIT_FLAG2_DISARM_RANGED => 'Entwaffne Fernkampf', + UNIT_FLAG2_REGENERATE_POWER => 'Regeneriere Energie/Mana/Wut', + UNIT_FLAG2_RESTRICT_PARTY_INTERACTION => 'Beschränke Gruppeninteraktion', + UNIT_FLAG2_PREVENT_SPELL_CLICK => 'Verhindere Zauber-Klick', + UNIT_FLAG2_ALLOW_ENEMY_INTERACT => 'Interaktion mit Gegner zulassen', + UNIT_FLAG2_DISABLE_TURN => 'Rotation deaktiviert', + UNIT_FLAG2_UNK2 => 'UNK-2', + UNIT_FLAG2_PLAY_DEATH_ANIM => 'Spezielle Todesanimation abspielen', + UNIT_FLAG2_ALLOW_CHEAT_SPELLS => 'Cheat-Zauber zulassen' + ), + 'dynFlags' => array( + UNIT_DYNFLAG_LOOTABLE => 'Plünderbar', + UNIT_DYNFLAG_TRACK_UNIT => 'Verfolgt', + UNIT_DYNFLAG_TAPPED => 'Getappt', + UNIT_DYNFLAG_TAPPED_BY_PLAYER => 'Getappt durch Spieler', + UNIT_DYNFLAG_SPECIALINFO => 'Besondere Info', + UNIT_DYNFLAG_DEAD => 'Tot', + UNIT_DYNFLAG_REFER_A_FRIEND => 'Refer-a-friend', + UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST => 'Getappt durch ganze Aggro-Liste' + ), + 'bytes1' => array( +/*idx:0*/ ['Stehend', 'Am Boden sitzend', 'Auf Stuhl sitzend', 'Schlafend', 'Auf niedrigem Stuhl sitzend', 'Auf mittlerem Stuhl sitzend', 'Auf hohem Stuhl sitzend', 'Tot', 'Kniehend', 'Untergetaucht'], // STAND_STATE_* + null, +/*idx:2*/ array( + UNIT_STAND_FLAGS_UNK1 => 'UNK-1', + UNIT_STAND_FLAGS_CREEP => 'Creep', + UNIT_STAND_FLAGS_UNTRACKABLE => 'Unangreifbar', + UNIT_STAND_FLAGS_UNK4 => 'UNK-4', + UNIT_STAND_FLAGS_UNK5 => 'UNK-5' + ), +/*idx:3*/ array( + UNIT_BYTE1_FLAG_ALWAYS_STAND => 'Immer stehend', + UNIT_BYTE1_FLAG_HOVER => 'Schwebend', + UNIT_BYTE1_FLAG_UNK_3 => 'UNK-3' + ), + 'valueUNK' => '[span class=q10]unbenutzter Wert [b class=q1]%d[/b] übergeben an UnitFieldBytes1 auf Offset [b class=q1]%d[/b][/span]', + 'idxUNK' => '[span class=q10]unbenutzter Offset [b class=q1]%d[/b] übergeben an UnitFieldBytes1[/span]' + ) + ), + 'smartAI' => array( + 'eventUNK' => '[span class=q10]Unbenkanntes Event #[b class=q1]%d[/b] in Benutzung.[/span]', + 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', + 'events' => array( + SAI_EVENT_UPDATE_IC => ['(%7$d)?:Im Kampf, ;(%6$s)?Nach %6$s:Sofort;', 'Wiederhole alle %s'], + SAI_EVENT_UPDATE_OOC => ['(%7$d)?:Nicht im Kampf, ;(%6$s)?Nach %6$s:Sofort;', 'Wiederhole alle %s'], + SAI_EVENT_HEALT_PCT => ['Ab %6$s%% Gesundheit', 'Wiederhole alle %s'], + SAI_EVENT_MANA_PCT => ['Ab %6$s%% Mana', 'Wiederhole alle %s'], + SAI_EVENT_AGGRO => ['Bei Aggro', null], + SAI_EVENT_KILL => ['Beim Töten von (%3$d)?einem Spieler:;(%4$d)?[npc=%4$d]:einer Kreatur;', 'Abklingzeit: %s'], + SAI_EVENT_DEATH => ['Im Tod', null], + SAI_EVENT_EVADE => ['Beim Entkommen', null], + SAI_EVENT_SPELLHIT => ['Von (%6$s)?%6$s-:;(%1$d)?[spell=%1$d]:Zauber; getroffen', 'Abklingzeit: %s'], + SAI_EVENT_RANGE => ['Ziel innerhalb von %6$sm', 'Wiederhole alle %s'], +/* 10*/ SAI_EVENT_OOC_LOS => ['(%1$d)?Freundlicher:Feindlicher; (%5$d)?Spieler:NPC; kommt ausserhalb des Kampfes innerhalb von %2$dm ins Sichtfeld', 'Abklingzeit: %s'], + SAI_EVENT_RESPAWN => ['Beim Wiedereinstieg', null], + SAI_EVENT_TARGET_HEALTH_PCT => ['Ziel hat %6$s%% Gesundheit', 'Wiederhole alle %s'], + SAI_EVENT_VICTIM_CASTING => ['Aktuelles Ziel wirkt (%3$d)?[spell=%3$d]:beliebigen Zauber;', 'Wiederhole alle %s'], + SAI_EVENT_FRIENDLY_HEALTH => ['Freundlicher NPC innerhalb von %2$dm hat %1$d Gesundheit', 'Wiederhole alle %s'], + SAI_EVENT_FRIENDLY_IS_CC => ['Freundlicher NPC innerhalb von %1$dm ist beeinflusst von \'Crowd Control\'', 'Wiederhole alle %s'], + SAI_EVENT_FRIENDLY_MISSING_BUFF => ['Freundlichem NPC innerhalb von %2$dm fehlt [spell=%1$d]', 'Wiederhole alle %s'], + SAI_EVENT_SUMMONED_UNIT => ['(%1$d)?[npc=%1$d]:Beliebige Kreatur; wurde gerade beschworen', 'Abklingzeit: %s'], + SAI_EVENT_TARGET_MANA_PCT => ['Ziel hat %6$s%% Mana', 'Wiederhole alle %s'], + SAI_EVENT_ACCEPTED_QUEST => ['Gebe (%1$d)?[quest=%1$d]:beliebiges Quest;', null], +/* 20*/ SAI_EVENT_REWARD_QUEST => ['Belohne (%1$d)?[quest=%1$d]:beliebiges Quest;', null], + SAI_EVENT_REACHED_HOME => ['Erreiche \'Heimat\'-Koordinaten', null], + SAI_EVENT_RECEIVE_EMOTE => ['Das Ziel von [emote=%1$d] seiend', 'Abklingzeit: %s'], + SAI_EVENT_HAS_AURA => ['(%2$d)?Habe %2$d Aufladungen von [spell=%1$d]:Aura von [spell=%1$d] fehlt; ', 'Wiederhole alle %s'], + SAI_EVENT_TARGET_BUFFED => ['#target# hat (%2$d)?%2$d Aufladungen:Aura; von [spell=%1$d]', 'Wiederhole alle %s'], + SAI_EVENT_RESET => ['Beim Reset', null], + SAI_EVENT_IC_LOS => ['(%1$d)?Freundlicher:Feindlicher; (%5$d)?Spieler:NPC; kommt im Kampf innerhalb von %2$dm ins Sichtfeld', 'Abklingzeit: %s'], + SAI_EVENT_PASSENGER_BOARDED => ['Ein Passagier steigt zu', 'Abklingzeit: %s'], + SAI_EVENT_PASSENGER_REMOVED => ['Ein Passagier steigt ab', 'Abklingzeit: %s'], + SAI_EVENT_CHARMED => ['(%1$d)?Bezaubert werden:Bezauberung läuft ab;', null], +/* 30*/ SAI_EVENT_CHARMED_TARGET => ['Beim Bezaubern von #target#', null], + SAI_EVENT_SPELLHIT_TARGET => ['#target# wird von (%6$s)?%6$s :;(%1$d)?[spell=%1$d]:Zauber; getroffen', 'Abklingzeit: %s'], + SAI_EVENT_DAMAGED => ['Nehme %6$s Punkte Schaden', 'Wiederhole alle %s'], + SAI_EVENT_DAMAGED_TARGET => ['#target# nahm %6$s Punkte Schaden', 'Wiederhole alle %s'], + SAI_EVENT_MOVEMENTINFORM => ['Beginne Bewegung zu Punkt #[b]%2$d[/b](%1$d)? mit MotionType #[b]%1$d[/b]:;', null], + SAI_EVENT_SUMMON_DESPAWNED => ['Beschworener NPC [npc=%1$d] verschwindet', 'Abklingzeit: %s'], + SAI_EVENT_CORPSE_REMOVED => ['Leiche verschwindet', null], + SAI_EVENT_AI_INIT => ['KI initialisiert', null], + SAI_EVENT_DATA_SET => ['Datenfeld #[b]%1$d[/b] auf [b]%2$d[/b] gesetzt', 'Abklingzeit: %s'], + SAI_EVENT_WAYPOINT_START => ['Beginne Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Wegpunkt #[b]%1$d[/b]:beliebigem Wegpunkt;', null], +/* 40*/ SAI_EVENT_WAYPOINT_REACHED => ['Erreiche (%1$d)?Wegpunkt #[b]%1$d[/b]:beliebigen Wegpunkt;(%2$d)? auf Pfad #[b]%2$d[/b]:;', null], + null, + null, + null, + null, + null, + SAI_EVENT_AREATRIGGER_ONTRIGGER => ['Bei Aktivierung', null], + null, + null, + null, +/* 50*/ null, + null, + SAI_EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:Beliebige Kreatur; ist fertig mit der Wiedergabe von Textgruppe #[b]%1$d[/b]', null], + SAI_EVENT_RECEIVE_HEAL => ['Erhalte %6$s Punkte Heilung', 'Abklingzeit: %s'], + SAI_EVENT_JUST_SUMMONED => ['Wurde gerade beschworen', null], + SAI_EVENT_WAYPOINT_PAUSED => ['Pausiere Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Wegpunkt #[b]%1$d[/b]:beliebigem Wegpunkt;', null], + SAI_EVENT_WAYPOINT_RESUMED => ['Setze Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Wegpunkt #[b]%1$d[/b]:beliebigem Wegpunkt; fort', null], + SAI_EVENT_WAYPOINT_STOPPED => ['Halte Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Waypoint #[b]%1$d[/b]:beliebigem Wegpunkt; an', null], + SAI_EVENT_WAYPOINT_ENDED => ['Beende aktuellen Pfad(%2$d)? #[b]%2$d[/b]:; an (%1$d)?Waypoint #[b]%1$d[/b]:beliebigem Wegpunkt;', null], + SAI_EVENT_TIMED_EVENT_TRIGGERED => ['Geplanted Ereignis #[b]%1$d[/b] löst aus', null], +/* 60*/ SAI_EVENT_UPDATE => ['(%6$s)?Nach %6$s:Sofort;', 'Wiederhole alle %s'], + SAI_EVENT_LINK => ['Nach Ereignis %6$s', null], + SAI_EVENT_GOSSIP_SELECT => ['Wähle Gossip:[br](%6$s)?[span class=q1]%6$s[/span]:Menü #[b]%1$d[/b] - Option #[b]%2$d[/b];', null], + SAI_EVENT_JUST_CREATED => ['Beim ersten Erscheinen in der Welt', null], + SAI_EVENT_GOSSIP_HELLO => ['Öffne Gossip', null], + SAI_EVENT_FOLLOW_COMPLETED => ['Ist fertig mit folgen', null], + SAI_EVENT_EVENT_PHASE_CHANGE => ['Ereignisphase wurde geändert und passt auf %6$s', null], + SAI_EVENT_IS_BEHIND_TARGET => ['Stehe hinter #target#', 'Abklingzeit: %s'], + SAI_EVENT_GAME_EVENT_START => ['[event=%1$d] beginnt', null], + SAI_EVENT_GAME_EVENT_END => ['[event=%1$d] endet', null], +/* 70*/ SAI_EVENT_GO_STATE_CHANGED => ['Zustand wurde geändert', null], + SAI_EVENT_GO_EVENT_INFORM => ['Taxi-Pfad Ereignis #[b]%1$d[/b] wurde ausgelöst', null], + SAI_EVENT_ACTION_DONE => ['Script-Aktion #[b]%1$d[/b] ausgeführt', null], + SAI_EVENT_ON_SPELLCLICK => ['Zauber-Klick wurde ausgelöst', null], + SAI_EVENT_FRIENDLY_HEALTH_PCT => ['Gesundheit von #target# ist %6$s%%', 'Wiederhole alle %s'], + SAI_EVENT_DISTANCE_CREATURE => ['[npc=%6$d](%1$d)? mit GUID #%1$d:; nähert sich auf %2$dm', 'Wiederhole alle %s'], + SAI_EVENT_DISTANCE_GAMEOBJECT => ['[object=%6$d](%1$d)? mit GUID #%1$d:; nähert sich auf %2$dm', 'Wiederhole alle %s'], + SAI_EVENT_COUNTER_SET => ['Zähler #[b]%1$d[/b] ist gleich [b]%2$d[/b]', null], + ), + 'eventFlags' => array( + SAI_EVENT_FLAG_NO_REPEAT => 'Nicht wiederholbar', + SAI_EVENT_FLAG_DIFFICULTY_0 => 'Normaler Dungeon', + SAI_EVENT_FLAG_DIFFICULTY_1 => 'Heroischer Dungeon', + SAI_EVENT_FLAG_DIFFICULTY_2 => 'Normaler Schlachtzug', + SAI_EVENT_FLAG_DIFFICULTY_3 => 'Heroischer Schlachtzug', + SAI_EVENT_FLAG_NO_RESET => 'Nicht resetbar', + SAI_EVENT_FLAG_WHILE_CHARMED => 'Auch wenn bezaubert' + ), + 'actionUNK' => '[span class=q10]Unbekannte Action #[b class=q1]%d[/b] in Benutzung.[/span]', + 'actionTT' => '[b class=q1]ActionType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][tr][td]Param6[/td][td=header]%d[/td][/tr][/table]', + 'actions' => array( // [body, footer] + null, + SAI_ACTION_TALK => ['(%3$d)?Gib:#target# gibt; (%7$d)?TextGroup:[span class=q10]unbekannten Text[/span]; #[b]%1$d[/b] für #target# wieder%8$s', 'Dauer: %s'], + SAI_ACTION_SET_FACTION => ['Setze Fraktion von #target# (%1$d)?auf [faction=%7$d]:zurück;.', null], + SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%7$d)?Setze Aussehen zurück.:Nimm folgendes Erscheinungsbild an:;(%1$d)? [npc=%1$d]:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], + SAI_ACTION_SOUND => ['Spiele Audio(%2$d)? für auslösenden Spieler:;:[div float=right width=270px][sound=%1$d][/div]', 'Abgespielt durch Welt.'], + SAI_ACTION_PLAY_EMOTE => ['Emote [emote=%1$d] zu #target#.', null], + SAI_ACTION_FAIL_QUEST => ['[quest=%1$d] von #target# schlägt fehl.', null], + SAI_ACTION_OFFER_QUEST => ['(%2$d)?Füge [quest=%1$d] dem Log von #target# hinzu:Biete [quest=%1$d] #target# an;.', null], + SAI_ACTION_SET_REACT_STATE => ['#target# wird %7$s.', null], + SAI_ACTION_ACTIVATE_GOBJECT => ['#target# wird aktiviert.', null], +/* 10*/ SAI_ACTION_RANDOM_EMOTE => ['Emote %7$s zu #target#.', null], + SAI_ACTION_CAST => ['Wirke [spell=%1$d] auf #target#.', null], + SAI_ACTION_SUMMON_CREATURE => ['Beschwöre [npc=%1$d](%4$d)?, den Auslöser angreifend:;(%3$d)? für %7$d:;.', null], + SAI_ACTION_THREAT_SINGLE_PCT => ['Ändere Bedrohung von #target# um %7$d%%.', null], + SAI_ACTION_THREAT_ALL_PCT => ['Ändere Bedrohung aller Ziele um %7$d%%.', null], + SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Erfülle Entdeckungsereignis von [quest=%1$d] für #target#.', null], + SAI_ACTION_SET_EMOTE_STATE => ['Emote [emote=%1$d] kontinuierlich zu #target#.', null], + SAI_ACTION_SET_UNIT_FLAG => ['Setze (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], + SAI_ACTION_REMOVE_UNIT_FLAG => ['Setze (%2$d)?UnitFlags2:UnitFlags; %7$s zurück.', null], +/* 20*/ SAI_ACTION_AUTO_ATTACK => ['(%1$d)?Beginne:Beende; automatische Angriffe gegen #target#.', null], + SAI_ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Erlaube:Verbiete; Bewegung im Kampf.', null], + SAI_ACTION_SET_EVENT_PHASE => ['Setze Ereignisphase von #target# auf [b]%1$d[/b].', null], + SAI_ACTION_INC_EVENT_PHASE => ['(%1$d)?Inkrementiere:Dekrementiere; Ereignisphase von #target#.', null], + SAI_ACTION_EVADE => ['#target# entkommt.', null], + SAI_ACTION_FLEE_FOR_ASSIST => ['Fliehe nach Hilfe.', 'Benutze Standard Flucht-Emote'], + SAI_ACTION_CALL_GROUPEVENTHAPPENS => ['Erfülle Ziel von [quest=%1$d] für #target#.', null], + SAI_ACTION_COMBAT_STOP => ['Beende aktuellen Kampf.', null], + SAI_ACTION_REMOVEAURASFROMSPELL => ['Entferne (%1$d)?alle Auren:Aura [spell=%1$d]; von #target#.', null], + SAI_ACTION_FOLLOW => ['Folge #target#(%1$d)? mit %1$dm Abstand:;(%3$d)? bis zum Erreichen von [npc=%3$d]:;.', '(%7$d)?Winkel: %7$.2f°:;(%8$d)? Eine Form von Questziel wird erfüllt:;'], +/* 30*/ SAI_ACTION_RANDOM_PHASE => ['Wähle zufällige Ereignisphase aus %7$s.', null], + SAI_ACTION_RANDOM_PHASE_RANGE => ['Wähle zufällige Ereignisphase zwischen %1$d und %2$d.', null], + SAI_ACTION_RESET_GOBJECT => ['Setze #target# zurück.', null], + SAI_ACTION_CALL_KILLEDMONSTER => ['Ein Tod von [npc=%1$d] wird #target# zugeschrieben.', null], + SAI_ACTION_SET_INST_DATA => ['Setze Instanz (%3$d)?Boss State:Datenfeld; #[b]]%1$d[/b] auf [b]%2$d[/b].', null], + null, + SAI_ACTION_UPDATE_TEMPLATE => ['Transformiere zu [npc=%1$d](%2$d)? mit Stufe [b]%2$d[/b]:;.', null], + SAI_ACTION_DIE => ['Stirb!', null], + SAI_ACTION_SET_IN_COMBAT_WITH_ZONE => ['Beginne Kampf mit allen Einheiten in der Zone.', null], + SAI_ACTION_CALL_FOR_HELP => ['Rufe nach Hilfe.', 'Benutze Standard Hilfe-Emote'], +/* 40*/ SAI_ACTION_SET_SHEATH => ['Stecke %7$s -waffen ein.', null], + SAI_ACTION_FORCE_DESPAWN => ['Entferne #target#(%1$d)? nach %7$s:;(%2$d)? und setze es nach %8$s wieder ein:;.', null], + SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Werde unverwundbar mit weniger als (%2$d)?%2$d%%:%1$d; Gesundheit.', null], + SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['Sitze (%7$d)?auf:ab; (%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], + SAI_ACTION_SET_INGAME_PHASE_MASK => ['Setze Sichtbarkeit von #target# auf Phase %7$s.', null], + SAI_ACTION_SET_DATA => ['[b]%2$d[/b] wird in Datenfeld #[b]%1$d[/b] von #target# abgelegt.', null], + null, + SAI_ACTION_SET_VISIBILITY => ['#target# wird (%1$d)?sichtbar:unsichtbar;.', null], + SAI_ACTION_SET_ACTIVE => ['#target# kann(%1$d)?: keine; Grids aktivieren.', null], + SAI_ACTION_ATTACK_START => ['Greife #target# an.', null], +/* 50*/ SAI_ACTION_SUMMON_GO => ['Beschwöre [object=%1$d] bei #target#(%2$d)? für ?%7$d:;.', 'Verschwinden an Beschwörer geknüpft'], + SAI_ACTION_KILL_UNIT => ['#target# stirbt!', null], + SAI_ACTION_ACTIVATE_TAXI => ['Fliege von [span class=q1]%7$s[/span] nach [span class=q1]%8$s[/span]', null], + SAI_ACTION_WP_START => ['(%1$d)?Gehe:Renne; auf Pfad #[b]%2$d[/b].(%4$d)? Verknüpft mit [quest=%4$d].:; Reagiere auf dem Pfad %8$s.(%5$d)? Verschwinde nach %7$s.:;', 'Wiederholbar'], + SAI_ACTION_WP_PAUSE => ['Pausiere Pfad für %7$d.', null], + SAI_ACTION_WP_STOP => ['Beende Pfad(%1$d)? und verschwinde nach %7$s:;.(%8$d)? [quest=%2$d] schlägt fehl.:;(%9$d)? [quest=%2$d] wird abgeschlossen.:;', null], + SAI_ACTION_ADD_ITEM => ['Gib #target# %2$d [item=%1$d].', null], + SAI_ACTION_REMOVE_ITEM => ['Nimm %2$d [item=%1$d] von #target#.', null], + SAI_ACTION_INSTALL_AI_TEMPLATE => ['Verhalten als %7$s.', null], + SAI_ACTION_SET_RUN => ['(%1$d)?Renne:Gehe;.', null], +/* 60*/ SAI_ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Ignoriere:Berücksichtige; Scherkraft!', null], + SAI_ACTION_SET_SWIM => ['Kann(%1$d)?: nicht; schwimmen.', null], + SAI_ACTION_TELEPORT => ['#target# wird nach [zone=%7$d] teleportiert.', null], + SAI_ACTION_SET_COUNTER => ['(%3$d)?Setze:Erhöhe; Zähler #[b]%1$d[/b] von #target# (%3$d)?zurück:um [b]%2$d[/b];.', null], + SAI_ACTION_STORE_TARGET_LIST => ['Speichere #target# als Ziel in #[b]%1$d[/b].', null], + SAI_ACTION_WP_RESUME => ['Setze Pfad fort.', null], + SAI_ACTION_SET_ORIENTATION => ['Richte nach (%7$s)?%7$s:\'Heimat\'-Position; aus.', null], + SAI_ACTION_CREATE_TIMED_EVENT => ['(%8$d)?%6$d%% Chance:Löse; Verzögertes Ereignis #[b]%1$d[/b](%7$s)? nach %7$s:; (%8$d)?auszulösen:aus;.', 'Wiederhole alle %s'], + SAI_ACTION_PLAYMOVIE => ['Spiele Video #[b]%1$d[/b] für #target# ab.', null], + SAI_ACTION_MOVE_TO_POS => ['Bewege (%4$d)?innerhalb von %4$dm von:nach; Punkt #[b]%1$d[/b] bei #target#(%2$d)? auf einerm Transporter:;.', 'ohne Wegfindung'], +/* 70*/ SAI_ACTION_ENABLE_TEMP_GOBJ => ['#target# wird für %7$s wieder eingesetzt.', null], + SAI_ACTION_EQUIP => ['(%8$d)?Lege nicht-standard Ausrüstung ab:Rüste %7$s;(%1$d)? vom Ausrüstungs-Template #[b]%1$d[/b]:; an #target#(%8$d)?: aus;.', 'Hinweis: Gegenstände für Kreaturen haben nicht zwingend ein Gegenstands-Template'], + SAI_ACTION_CLOSE_GOSSIP => ['Schließe Gossip-Fenster.', null], + SAI_ACTION_TRIGGER_TIMED_EVENT => ['Löse Verzögertes Ereignis #[b]%1$d[/b] aus.', null], + SAI_ACTION_REMOVE_TIMED_EVENT => ['Lösche Verzögertes Ereignis #[b]%1$d[/b].', null], + SAI_ACTION_ADD_AURA => ['Wende Aura von [spell=%1$d] auf #target# an.', null], + SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Benutze #target# als Basis für alle weiteren SmartAI-Ereignisse.', null], + SAI_ACTION_RESET_SCRIPT_BASE_OBJECT => ['Setze Basis für SmartAI-Ereignisse zurück.', null], + SAI_ACTION_CALL_SCRIPT_RESET => ['Setze aktuelles SmartAI zurück.', null], + SAI_ACTION_SET_RANGED_MOVEMENT => ['Setze Abstand für Fernkampf auf [b]%1$d[/b]m(%2$d)?, %2$d°:;.', null], +/* 80*/ SAI_ACTION_CALL_TIMED_ACTIONLIST => ['Rufe [html]Timed Actionlist #%1$d[/html] auf. Läuft %7$s ab.', null], + SAI_ACTION_SET_NPC_FLAG => ['Setze NpcFlags von #target# auf %7$s.', null], + SAI_ACTION_ADD_NPC_FLAG => ['Füge NpcFlags %7$s #target# hinzu.', null], + SAI_ACTION_REMOVE_NPC_FLAG => ['Entferne NpcFlags %7$s von #target#.', null], + SAI_ACTION_SIMPLE_TALK => ['#target# gibt (%7$s)?TextGroup:[span class=q10]unbekannten Text[/span]; #[b]%1$d[/b] für #target# wieder%7$s', null], + SAI_ACTION_INVOKER_CAST => ['Auslöser wirkt [spell=%1$d] auf #target#.', null], + SAI_ACTION_CROSS_CAST => ['%7$s wirkt [spell=%1$d] auf #target#.', null], + SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Rufe zufällige Timed Actionlist auf: [html]%7$s[/html]', null], + SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Rufe zufällige Timed Actionlist aus Zahlenbreich auf: [html]%7$s[/html]', null], + SAI_ACTION_RANDOM_MOVE => ['Bewege #target# zu zufälligem Punkt innerhalb von %1$dm.', null], +/* 90*/ SAI_ACTION_SET_UNIT_FIELD_BYTES_1 => ['Setze UnitFieldBytes1 von #target# auf %7$s.', null], + SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Entferne UnitFieldBytes1 %7$s von #target#.', null], + SAI_ACTION_INTERRUPT_SPELL => ['Unterbreche Wirken (%2$d)?von [spell=%2$d]:vom aktuellen Zauber;.', '(%1$d)?Sofort:Verzögert;'], + SAI_ACTION_SEND_GO_CUSTOM_ANIM => ['Setze Animationsfortschritt auf [b]%1$d[/b].', null], + SAI_ACTION_SET_DYNAMIC_FLAG => ['Setze Dynamic Flag von #target# auf %7$s.', null], + SAI_ACTION_ADD_DYNAMIC_FLAG => ['Füge Dynamic Flag %7$s #target# hinzu.', null], + SAI_ACTION_REMOVE_DYNAMIC_FLAG => ['Entferne Dynamic Flag %7$s von #target#.', null], + SAI_ACTION_JUMP_TO_POS => ['Springe auf feste Position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f, [i]v[/i][sub]xy[/sub]: %1$.2f [i]v[/i][sub]z[/sub]: %2$.2f[/b]', null], + SAI_ACTION_SEND_GOSSIP_MENU => ['Zeige Gossip #[b]%1$d[/b] / TextID #[b]%2$d[/b].', null], + SAI_ACTION_GO_SET_LOOT_STATE => ['Setze Plündern-Status von #target# auf %7$s.', null], +/*100*/ SAI_ACTION_SEND_TARGET_TO_TARGET => ['Sende gespeicherte Ziele aus #[b]%1$d[/b] an #target#.', null], + SAI_ACTION_SET_HOME_POS => ['Setze Heimat-Position auf (%10$d)?aktuelle Position.:feste Position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b];', null], + SAI_ACTION_SET_HEALTH_REGEN => ['(%1$d)?Lasse:Verhindere; Gesundheitsregeneration von #target#(%1$d)? zu:;.', null], + SAI_ACTION_SET_ROOT => ['(%1$d)?Lasse:Verhindere; Bewegung im Kampf von #target#(%1$d)? zu:;.', null], + SAI_ACTION_SET_GO_FLAG => ['Setze Gameobject Flags von #target# auf %7$s.', null], + SAI_ACTION_ADD_GO_FLAG => ['Füge Gameobject Flag %7$s #target# hinzu.', null], + SAI_ACTION_REMOVE_GO_FLAG => ['Entferne Gameobject Flag %7$s von #target#.', null], + SAI_ACTION_SUMMON_CREATURE_GROUP => ['Beschwöre Kreaturengruppe #[b]%1$d[/b](%2$d)?, den Auslöser angreifend:;.[br](%7$s)?[span class=breadcrumb-arrow] [/span]%7$s:[span class=q0][/span];', null], + SAI_ACTION_SET_POWER => ['Setze %7$s von #target# auf [b]%2$d[/b].', null], + SAI_ACTION_ADD_POWER => ['Gib #target# [b]%2$d[/b] %7$s.', null], +/*110*/ SAI_ACTION_REMOVE_POWER => ['Entferne [b]%2$d[/b] %7$s von #target#.', null], + SAI_ACTION_GAME_EVENT_STOP => ['Beende [event=%1$d].', null], + SAI_ACTION_GAME_EVENT_START => ['Starte [event=%1$d].', null], + SAI_ACTION_START_CLOSEST_WAYPOINT => ['#target# beginnt Pfad. Betritt den Pfad am nächstliegenden dieser Punkte: %7$s.', null], + SAI_ACTION_MOVE_OFFSET => ['Bewege zu relativer Position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b]', null], + SAI_ACTION_RANDOM_SOUND => ['Spiele zufälliges Audio(%5$d)? an auslösenden Spieler:;:[div float=right width=270px]%7$s[/div]', 'Abgespielt durch Welt.'], + SAI_ACTION_SET_CORPSE_DELAY => ['Setze Verzögerung für das Verschwindne der Leiche von #target# auf %7$s.', null], + SAI_ACTION_DISABLE_EVADE => ['(%1$d)?Verhindere:Lasse; Entkommen(%1$d)?: zu;.', null], + SAI_ACTION_GO_SET_GO_STATE => ['Setze Gameobject Status auf %7$s.'. null], + SAI_ACTION_SET_CAN_FLY => ['(%1$d)?Lasse:Verhindere; Fliegen(%1$d)? zu:;.', null], +/*120*/ SAI_ACTION_REMOVE_AURAS_BY_TYPE => ['Entferne alle Auren mit [b]%7$s[/b] von #target#.', null], + SAI_ACTION_SET_SIGHT_DIST => ['Setze Sichtweite von #target# auf %1$dm.', null], + SAI_ACTION_FLEE => ['#target# flieht für %7$s und sucht Hilfe.', null], + SAI_ACTION_ADD_THREAT => ['Ändere Bedrohung von #target# um %7$d Punkte.', null], + SAI_ACTION_LOAD_EQUIPMENT => ['(%2$d)?Lege nicht-standart Ausrüstung ab:Rüste %7$s; von Ausrüstungs-Template #[b]%1$d[/b] an #target#(%8$d)?: aus;.', 'Hinweis: Gegenstände für Kreaturen haben nicht zwingend ein Gegenstands-Template'], + SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Löse definiertes verzögertes Ereignis innerhalb von %7$s aus.', null], + SAI_ACTION_REMOVE_ALL_GAMEOBJECTS => ['Entferne alle Gameobjects von #target#.', null], + SAI_ACTION_STOP_MOTION => ['(%1$d)?Entferne motion type #[b]%1$d[/b] von #target#. :;(%2$d)?Beende Bewegung.:;', null], + ), + 'targetUNK' => '[span class=q10]unbekanntes Ziel#[b class=q1]%d[/b][/span]', + 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%.2f[/td][/tr][tr][td]Y[/td][td=header]%.2f[/td][/tr][tr][td]Z[/td][td=header]%.2f[/td][/tr][tr][td]O[/td][td=header]%.2f[/td][/tr][/table]', + 'targets' => array( + null, + SAI_TARGET_SELF => 'selbst', + SAI_TARGET_VICTIM => 'aktuelles Ziel', + SAI_TARGET_HOSTILE_SECOND_AGGRO => '2. in Aggro', + SAI_TARGET_HOSTILE_LAST_AGGRO => 'letzter in Aggro', + SAI_TARGET_HOSTILE_RANDOM => 'zufälliges Ziel', + SAI_TARGET_HOSTILE_RANDOM_NOT_TOP => 'zufälliges nicht-Tank Ziel', + SAI_TARGET_ACTION_INVOKER => 'Auslöser', + SAI_TARGET_POSITION => 'Weltkoordinaten', + SAI_TARGET_CREATURE_RANGE => '(%1$d)?zufällige Instanz von [npc=%1$d]:beliebige Kreatur; innerhalb von %4$sm', +/*10*/ SAI_TARGET_CREATURE_GUID => '(%4$d)?[npc=%4$d]:NPC; mit GUID #%1$d', + SAI_TARGET_CREATURE_DISTANCE => '(%1$d)?zufällige Instanz von [npc=%1$d]:beliebige Kreatur; innerhalb von %4$sm', + SAI_TARGET_STORED => 'vorher gespeichertes Ziel', + SAI_TARGET_GAMEOBJECT_RANGE => '(%1$d)?zufällige Instanz von [object=%1$d]:beliebiges Objekt; innerhalb von %4$sm', + SAI_TARGET_GAMEOBJECT_GUID => '(%4$d)?[object=%4$d]:Gameobject; mit GUID #%1$d', + SAI_TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?zufällige Instanz von [object=%1$d]:beliebiges Objekt; innerhalb von %4$sm', + SAI_TARGET_INVOKER_PARTY => 'Gruppe des Auslösenden', + SAI_TARGET_PLAYER_RANGE => 'zufälliger Spieler innerhalb von %4$sm', + SAI_TARGET_PLAYER_DISTANCE => 'zufälliger Spieler innerhalb von %4$sm', + SAI_TARGET_CLOSEST_CREATURE => 'nächste (%3$d)?tote:lebendige; (%1$d)?[npc=%1$d]:beliebige Kreatur; innerhalb von %4$sm', +/*20*/ SAI_TARGET_CLOSEST_GAMEOBJECT => 'nächstes (%1$d)?[object=%1$d]:beliebiges Gameobject; innerhalb von %4$sm', + SAI_TARGET_CLOSEST_PLAYER => 'nächster Spieler innerhalb von %1$dm', + SAI_TARGET_ACTION_INVOKER_VEHICLE => 'Fahrzeug des Auslösenden', + SAI_TARGET_OWNER_OR_SUMMONER => 'Besitzer oder Beschwörer des Auslösenden', + SAI_TARGET_THREAT_LIST => 'alle Einheiten, die mit mir im Kampf sind', + SAI_TARGET_CLOSEST_ENEMY => 'nächster angreifbarer (%2$d)?Spieler:Gegner; innerhalb von %1$dm', + SAI_TARGET_CLOSEST_FRIENDLY => 'nächster (%2$d)?freundlicher Spieler:freundliche Kreatur; innerhalb von %1$dm', + SAI_TARGET_LOOT_RECIPIENTS => 'alle Spieler mit Lootberechtigung', + SAI_TARGET_FARTHEST => 'am weitesten (%2$d)?entferter, kämpfender Spieler:entferte, kämpfende Kreatur; innerhalb von %1$dm(%3$d)? und im Sichtfeld:;', + SAI_TARGET_VEHICLE_ACCESSORY => 'Zusatz im Sitz %1$d des Fahrzeug des Auslösenden' + ), + 'castFlags' => array( + SAI_CAST_FLAG_INTERRUPT_PREV => 'Unterbreche aktives wirken', + SAI_CAST_FLAG_TRIGGERED => 'Ausgelöst', + SAI_CAST_FLAG_AURA_MISSING => 'Aura fehlt', + SAI_CAST_FLAG_COMBAT_MOVE => 'Bewegung im Kampf' + ), + 'GOStates' => ['aktiv', 'bereit', 'alternativ aktiv'], + 'summonTypes' => [null, 'Despawn nach Zeit oder wenn Leiche verschwindet', 'Despawn nach Zeit oder beim Sterben', 'Despawn nach Zeit', 'Despawn nach Zeit ausserhalb des Kampfes', 'Despawn beim Sterben', 'Despawn nach Zeit nach dem Tod', 'Despawn wenn Leiche verschwindet', 'Manueller despawn'], + 'aiTpl' => ['einfache KI', 'Zauberer', 'Geschütz', 'passive Kreatur', 'Käfig für Kreatur', 'Kreatur im Käfig'], + 'reactStates' => ['passiv', 'defensiv', 'aggressiv', 'helfend'], + 'sheaths' => ['alle', 'Nahkampf', 'Fernkampf'], + 'saiUpdate' => ['ausserhalb des Kampfes', 'im Kampf', 'immer'], + 'lootStates' => ['Nicht bereit', 'Bereit', 'Aktiviert', 'Gerade deaktiviert'], + + 'GOStateUNK' => '[span class=q10]unbekannter Gameobject-Status #[b class=q1]%d[/b][/span]', + 'summonTypeUNK' => '[span class=q10]unbekannter SummonType #[b class=q1]%d[/b][/span]', + 'aiTplUNK' => '[span class=q10]unbekanntes AI-Template #[b class=q1]%d[/b][/span]', + 'reactStateUNK' => '[span class=q10]unbekannter ReactState #[b class=q1]%d[/b][/span]', + 'sheathUNK' => '[span class=q10]unbekannter sheath #[b class=q1]%d[/b][/span]', + 'saiUpdateUNK' => '[span class=q10]unbekannte Updatebedingung #[b class=q1]%d[/b][/span]', + 'lootStateUNK' => '[span class=q10]unbekannter Plündern-Status #[b class=q1]%d[/b][/span]', + + 'empty' => '[span class=q0][/span]' ), 'account' => array( 'title' => "Aowow-Konto", @@ -461,7 +827,17 @@ $lang = array( 'triggeredBy' => "Ausgelöst durch", 'capturePoint' => "Eroberungspunkt", 'foundIn' => "Dieses Objekt befindet sich in", - 'restock' => "Wird alle %s wieder aufgefüllt." + 'restock' => "Wird alle %s wieder aufgefüllt.", + 'goFlags' => array( + GO_FLAG_IN_USE => 'In Benutzung', + GO_FLAG_LOCKED => 'Verschlossen', + GO_FLAG_INTERACT_COND => 'Nicht interagierbar', + GO_FLAG_TRANSPORT => 'Transporter', + GO_FLAG_NOT_SELECTABLE => 'Nicht anwählbar', + GO_FLAG_TRIGGERED => 'Ausgelöst', + GO_FLAG_DAMAGED => 'Belagerung beschädigt', + GO_FLAG_DESTROYED => 'Belagerung zerstört' + ) ), 'npc' => array( 'notFound' => "Dieser NPC existiert nicht.", @@ -498,6 +874,32 @@ $lang = array( 'cat' => array( "Nicht kategorisiert", "Wildtiere", "Drachkin", "Dämonen", "Elementare", "Riesen", "Untote", "Humanoide", "Tiere", "Mechanisch", "Nicht spezifiziert", "Totems", "Haustiere", "Gaswolken" + ), + 'npcFlags' => array( + NPC_FLAG_GOSSIP => 'Gossip', + NPC_FLAG_QUEST_GIVER => 'Questgeber', + NPC_FLAG_TRAINER => 'Lehrer', + NPC_FLAG_CLASS_TRAINER => 'Klassen-Lehrer', + NPC_PROFESSION_TRAINER => 'Berufe-Lehrer', + NPC_FLAG_VENDOR => 'Händler', + NPC_FLAG_VENDOR_AMMO => 'Munitionshändler', + NPC_FLAG_VENDOR_FOOD => 'Lebensmittelhänler', + NPC_FLAG_VENDOR_POISON => 'Gifthändler', + NPC_FLAG_VENDOR_REAGENT => 'Reagenzienhändler', + NPC_FLAG_REPAIRER => 'Reparatur', + NPC_FLAG_FLIGHT_MASTER => 'Flugmeister', + NPC_FLAG_SPIRIT_HEALER => 'Geistheiler', + NPC_FLAG_SPIRIT_GUIDE => 'Geistführer', + NPC_FLAG_INNKEEPER => 'Gastwirt', + NPC_FLAG_BANKER => 'Bankier', + NPC_FLAG_PETITIONER => 'Petition', + NPC_FLAG_GUILD_MASTER => 'Gildenmeister', + NPC_FLAG_BATTLEMASTER => 'Kampfmeister', + NPC_FLAG_AUCTIONEER => 'Auktionator', + NPC_FLAG_STABLE_MASTER => 'Stallmeister', + NPC_FLAG_GUILD_BANK => 'Gildenbank', + NPC_FLAG_SPELLCLICK => 'Zauber-Klick', + NPC_FLAG_MAILBOX => 'Briefkasten' ) ), 'event' => array( diff --git a/localization/locale_enus.php b/localization/locale_enus.php index 3197bf4c..729b67f3 100644 --- a/localization/locale_enus.php +++ b/localization/locale_enus.php @@ -336,6 +336,372 @@ $lang = array( "Knight-Champion / Centurion", "Lieutenant Commander / Champion", "Commander / Lieutenant General", "Marshal / General", "Field Marshal / Warlord", "Grand Marshal / High Warlord" ), + 'orientation' => ['North', 'Northeast', 'East', 'Southeast', 'South', 'Southwest', 'West', 'Northwest'] + ), + 'unit' => array( + 'flags' => array( + UNIT_FLAG_SERVER_CONTROLLED => 'Server controlled', + UNIT_FLAG_NON_ATTACKABLE => 'Not attackable', + UNIT_FLAG_REMOVE_CLIENT_CONTROL => 'Remove client control', + UNIT_FLAG_PVP_ATTACKABLE => 'PvP attackable', + UNIT_FLAG_RENAME => 'Rename', + UNIT_FLAG_PREPARATION => 'Arena preparation', + UNIT_FLAG_UNK_6 => 'UNK-6', + UNIT_FLAG_NOT_ATTACKABLE_1 => 'Not Attackable', + UNIT_FLAG_IMMUNE_TO_PC => 'Immune to players', + UNIT_FLAG_IMMUNE_TO_NPC => 'Immune to creatures', + UNIT_FLAG_LOOTING => 'Loot animation', + UNIT_FLAG_PET_IN_COMBAT => 'Pet in combat', + UNIT_FLAG_PVP => 'PvP', + UNIT_FLAG_SILENCED => 'Silenced', + UNIT_FLAG_CANNOT_SWIM => 'Cannot swim', + UNIT_FLAG_UNK_15 => 'UNK-15 (can only swim)', + UNIT_FLAG_UNK_16 => 'UNK-16 (cannot attack)', + UNIT_FLAG_PACIFIED => 'Pacified', + UNIT_FLAG_STUNNED => 'Stunned', + UNIT_FLAG_IN_COMBAT => 'In combat', + UNIT_FLAG_TAXI_FLIGHT => 'Taxi flight', + UNIT_FLAG_DISARMED => 'Disarmed', + UNIT_FLAG_CONFUSED => 'Confused', + UNIT_FLAG_FLEEING => 'Fleeing', + UNIT_FLAG_PLAYER_CONTROLLED => 'Player controlled', + UNIT_FLAG_NOT_SELECTABLE => 'Not selectable', + UNIT_FLAG_SKINNABLE => 'Skinnable', + UNIT_FLAG_MOUNT => 'Mounted', + UNIT_FLAG_UNK_28 => 'UNK-28', + UNIT_FLAG_UNK_29 => 'UNK-29 (Prevent emotes)', + UNIT_FLAG_SHEATHE => 'Sheathe weapon', + UNIT_FLAG_UNK_31 => 'UNK-31' + ), + 'flags2' => array( + UNIT_FLAG2_FEIGN_DEATH => 'Feign Death', + UNIT_FLAG2_UNK1 => 'UNK-1 (hide unit model)', + UNIT_FLAG2_IGNORE_REPUTATION => 'Ignore reputation', + UNIT_FLAG2_COMPREHEND_LANG => 'Comprehend language', + UNIT_FLAG2_MIRROR_IMAGE => 'Mirror Image', + UNIT_FLAG2_INSTANTLY_APPEAR_MODEL => 'Instant spawn', + UNIT_FLAG2_FORCE_MOVEMENT => 'Force movement', + UNIT_FLAG2_DISARM_OFFHAND => 'Disarm offhand weapon', + UNIT_FLAG2_DISABLE_PRED_STATS => 'Disable predicted stats', + UNIT_FLAG2_DISARM_RANGED => 'Disarm ranged weapon', + UNIT_FLAG2_REGENERATE_POWER => 'Regenerate power', + UNIT_FLAG2_RESTRICT_PARTY_INTERACTION => 'Restrict party interaction', + UNIT_FLAG2_PREVENT_SPELL_CLICK => 'Prevent spell click', + UNIT_FLAG2_ALLOW_ENEMY_INTERACT => 'Allow enemy interaction', + UNIT_FLAG2_DISABLE_TURN => 'Disable turn', + UNIT_FLAG2_UNK2 => 'UNK-2', + UNIT_FLAG2_PLAY_DEATH_ANIM => 'Play special death animation', + UNIT_FLAG2_ALLOW_CHEAT_SPELLS => 'allow cheat spells' + ), + 'dynFlags' => array( + UNIT_DYNFLAG_LOOTABLE => 'Lootable', + UNIT_DYNFLAG_TRACK_UNIT => 'Tracked', + UNIT_DYNFLAG_TAPPED => 'Tapped', + UNIT_DYNFLAG_TAPPED_BY_PLAYER => 'Tapped by player', + UNIT_DYNFLAG_SPECIALINFO => 'Special info', + UNIT_DYNFLAG_DEAD => 'Dead', + UNIT_DYNFLAG_REFER_A_FRIEND => 'Refer-a-friend', + UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST => 'Tapped by all threat list' + ), + 'bytes1' => array( +/*idx:0*/ ['Standing', 'Sitting on ground', 'Sitting on chair', 'Sleeping', 'Sitting on low chair', 'Sitting on medium chair', 'Sitting on high chair', 'Dead', 'Kneeing', 'Submerged'], // STAND_STATE_* + null, +/*idx:2*/ array( + UNIT_STAND_FLAGS_UNK1 => 'UNK-1', + UNIT_STAND_FLAGS_CREEP => 'Creep', + UNIT_STAND_FLAGS_UNTRACKABLE => 'Untrackable', + UNIT_STAND_FLAGS_UNK4 => 'UNK-4', + UNIT_STAND_FLAGS_UNK5 => 'UNK-5' + ), +/*idx:3*/ array( + UNIT_BYTE1_FLAG_ALWAYS_STAND => 'Always standing', + UNIT_BYTE1_FLAG_HOVER => 'Hovering', + UNIT_BYTE1_FLAG_UNK_3 => 'UNK-3' + ), + 'valueUNK' => '[span class=q10]unhandled value [b class=q1]%d[/b] provided for UnitFieldBytes1 on offset [b class=q1]%d[/b][/span]', + 'idxUNK' => '[span class=q10]unused offset [b class=q1]%d[/b] provided for UnitFieldBytes1[/span]' + ) + ), + 'smartAI' => array( + 'eventUNK' => '[span class=q10]Unknwon event #[b class=q1]%d[/b] in use.[/span]', + 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', + 'events' => array( + SAI_EVENT_UPDATE_IC => ['(%7$d)?:When in combat, ;(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_UPDATE_OOC => ['(%7$d)?:When out of combat, ;(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_HEALT_PCT => ['At %6$s%% Health', 'Repeat every %s'], + SAI_EVENT_MANA_PCT => ['At %6$s%% Mana', 'Repeat every %s'], + SAI_EVENT_AGGRO => ['On Aggro', null], + SAI_EVENT_KILL => ['On killing (%3$d)?player:;(%4$d)?[npc=%4$d]:any creature;', 'Cooldown: %s'], + SAI_EVENT_DEATH => ['On death', null], + SAI_EVENT_EVADE => ['When evading', null], + SAI_EVENT_SPELLHIT => ['When hit by (%6$s)?%6$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SAI_EVENT_RANGE => ['On target at %6$sm', 'Repeat every %s'], +/* 10*/ SAI_EVENT_OOC_LOS => ['While out of combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SAI_EVENT_RESPAWN => ['On respawn', null], + SAI_EVENT_TARGET_HEALTH_PCT => ['On target at %6$s%% health', 'Repeat every %s'], + SAI_EVENT_VICTIM_CASTING => ['Current target is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], + SAI_EVENT_TARGET_MANA_PCT => ['On target at %6$s%% mana', 'Repeat every %s'], + SAI_EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', null], +/* 20*/ SAI_EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', null], + SAI_EVENT_REACHED_HOME => ['Arriving at home coordinates', null], + SAI_EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], + SAI_EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_RESET => ['On reset', null], + SAI_EVENT_IC_LOS => ['While in combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SAI_EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], + SAI_EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], + SAI_EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', null], +/* 30*/ SAI_EVENT_CHARMED_TARGET => ['When charming #target#', null], + SAI_EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%6$s)?%6$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SAI_EVENT_DAMAGED => ['After taking %6$s points of damage', 'Repeat every %s'], + SAI_EVENT_DAMAGED_TARGET => ['After #target# took %6$s points of damage', 'Repeat every %s'], + SAI_EVENT_MOVEMENTINFORM => ['Started moving to point #[b]%2$d[/b](%1$d)? using MotionType #[b]%1$d[/b]:;', null], + SAI_EVENT_SUMMON_DESPAWNED => ['Summoned [npc=%1$d] despawned', 'Cooldown: %s'], + SAI_EVENT_CORPSE_REMOVED => ['On corpse despawn', null], + SAI_EVENT_AI_INIT => ['AI initialized', null], + SAI_EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], + SAI_EVENT_WAYPOINT_START => ['Start pathing on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], +/* 40*/ SAI_EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + null, + null, + null, + null, + null, + SAI_EVENT_AREATRIGGER_ONTRIGGER => ['On activation', null], + null, + null, + null, +/* 50*/ null, + null, + SAI_EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', null], + SAI_EVENT_RECEIVE_HEAL => ['Received %6$s points of healing', 'Cooldown: %s'], + SAI_EVENT_JUST_SUMMONED => ['On being summoned', null], + SAI_EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', null], +/* 60*/ SAI_EVENT_UPDATE => ['(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_LINK => ['After Event %6$s', null], + SAI_EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%6$s)?[span class=q1]%6$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', null], + SAI_EVENT_JUST_CREATED => ['On being spawned for the first time', null], + SAI_EVENT_GOSSIP_HELLO => ['Opening Gossip', null], + SAI_EVENT_FOLLOW_COMPLETED => ['Finished following', null], + SAI_EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %6$s', null], + SAI_EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], + SAI_EVENT_GAME_EVENT_START => ['[event=%1$d] started', null], + SAI_EVENT_GAME_EVENT_END => ['[event=%1$d] ended', null], +/* 70*/ SAI_EVENT_GO_STATE_CHANGED => ['State has changed', null], + SAI_EVENT_GO_EVENT_INFORM => ['Taxi path event #[b]%1$d[/b] trigered', null], + SAI_EVENT_ACTION_DONE => ['Executed action #[b]%1$d[/b] requested by script', null], + SAI_EVENT_ON_SPELLCLICK => ['Spellclick triggered', null], + SAI_EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %6$s%%', 'Repeat every %s'], + SAI_EVENT_DISTANCE_CREATURE => ['[npc=%6$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], + SAI_EVENT_DISTANCE_GAMEOBJECT => ['[object=%6$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], + SAI_EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', null], + ), + 'eventFlags' => array( + SAI_EVENT_FLAG_NO_REPEAT => 'No Repeat', + SAI_EVENT_FLAG_DIFFICULTY_0 => 'Normal Dungeon', + SAI_EVENT_FLAG_DIFFICULTY_1 => 'Heroic Dungeon', + SAI_EVENT_FLAG_DIFFICULTY_2 => 'Normal Raid', + SAI_EVENT_FLAG_DIFFICULTY_3 => 'Heroic Raid', + SAI_EVENT_FLAG_NO_RESET => 'No Reset', + SAI_EVENT_FLAG_WHILE_CHARMED => 'While Charmed' + ), + 'actionUNK' => '[span class=q10]Unknown action #[b class=q1]%d[/b] in use.[/span]', + 'actionTT' => '[b class=q1]ActionType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][tr][td]Param6[/td][td=header]%d[/td][/tr][/table]', + 'actions' => array( // [body, footer] + null, + SAI_ACTION_TALK => ['(%3$d)?Say:#target# says; (%7$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%8$s', 'Duration: %s'], + SAI_ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%7$d]:Reset faction of #target#;.', null], + SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%7$d)?Reset apperance.:Take the appearance of;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], + SAI_ACTION_SOUND => ['Play sound(%2$d)? to invoking player:;:[div float=right width=270px][sound=%1$d][/div]', 'Played by environment.'], + SAI_ACTION_PLAY_EMOTE => ['Emote [emote=%1$d] to #target#.', null], + SAI_ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', null], + SAI_ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', null], + SAI_ACTION_SET_REACT_STATE => ['#target# becomes %7$s.', null], + SAI_ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', null], +/* 10*/ SAI_ACTION_RANDOM_EMOTE => ['Emote %7$s to #target#.', null], + SAI_ACTION_CAST => ['Cast [spell=%1$d] at #target#.', null], + SAI_ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %7$d:;(%4$d)?, attacking invoker:;.', null], + SAI_ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %7$d%%.', null], + SAI_ACTION_THREAT_ALL_PCT => ['Modify the threat of all targets by %7$d%%.', null], + SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Exploration event of [quest=%1$d] is completed for #target#.', null], + SAI_ACTION_SET_EMOTE_STATE => ['Continuously emote [emote=%1$d] to #target#.', null], + SAI_ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], + SAI_ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], +/* 20*/ SAI_ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', null], + SAI_ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', null], + SAI_ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', null], + SAI_ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', null], + SAI_ACTION_EVADE => ['#target# enters Evade Mode.', null], + SAI_ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], + SAI_ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy objective of [quest=%1$d] for #target#.', null], + SAI_ACTION_COMBAT_STOP => ['End current combat.', null], + SAI_ACTION_REMOVEAURASFROMSPELL => ['Remove (%1$d)?all auras:auras of [spell=%1$d]; from #target#.', null], + SAI_ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.', '(%7$d)?Angle: %7$.2f°:;(%8$d)? Some form of Quest Credit is given:;'], +/* 30*/ SAI_ACTION_RANDOM_PHASE => ['Pick random Event Phase from %7$s.', null], + SAI_ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', null], + SAI_ACTION_RESET_GOBJECT => ['Reset #target#.', null], + SAI_ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to #target#.', null], + SAI_ACTION_SET_INST_DATA => ['Set Instance (%3$d)?Boss State:Data Field; #[b]]%1$d[/b] to [b]%2$d[/b].', null], + null, + SAI_ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d](%2$d)? with level [b]%2$d[/b]:;.', null], + SAI_ACTION_DIE => ['Die...   painfully.', null], + SAI_ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', null], + SAI_ACTION_CALL_FOR_HELP => ['Call for help.', 'Use default help emote'], +/* 40*/ SAI_ACTION_SET_SHEATH => ['Sheath %7$s weapons.', null], + SAI_ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %7$s:;(%2$d)? and then respawn after %8$s:;.', null], + SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become invincable below (%2$d)?%2$d%%:%1$d; HP.', null], + SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%7$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], + SAI_ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %7$s.', null], + SAI_ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', null], + null, + SAI_ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', null], + SAI_ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', null], + SAI_ACTION_ATTACK_START => ['Start attacking #target#.', null], +/* 50*/ SAI_ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for ?%7$d:; at #target#.', 'Despawn linked to summoner'], + SAI_ACTION_KILL_UNIT => ['#target# dies!', null], + SAI_ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%7$s[/span] to [span class=q1]%8$s[/span]', null], + SAI_ACTION_WP_START => ['(%1$d)?Walk:Run; on waypoint path #[b]%2$d[/b].(%4$d)? Is linked to [quest=%4$d].:; React %8$s while following the path.(%5$d)? Despawn after %7$s.:;', 'Repeatable'], + SAI_ACTION_WP_PAUSE => ['Pause waypoint path for %7$d.', null], + SAI_ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %7$s:;.(%8$d)? [quest=%2$d] fails.:;(%9$d)? [quest=%2$d] is completed.:;', null], + SAI_ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', null], + SAI_ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', null], + SAI_ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %7$s.', null], + SAI_ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', null], +/* 60*/ SAI_ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', null], + SAI_ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', null], + SAI_ACTION_TELEPORT => ['#target# is teleported to [zone=%7$d].', null], + SAI_ACTION_SET_COUNTER => ['(%3$d)?Reset:Increase; Counter #[b]%1$d[/b] of #target#(%3$d)?: by [b]%2$d[/b];.', null], + SAI_ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', null], + SAI_ACTION_WP_RESUME => ['Continue on waypoint path.', null], + SAI_ACTION_SET_ORIENTATION => ['Set orientation to (%7$s)?face %7$s:Home Position;.', null], + SAI_ACTION_CREATE_TIMED_EVENT => ['(%8$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%7$s)? after %7$s:;.', 'Repeat every %s'], + SAI_ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', null], + SAI_ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], +/* 70*/ SAI_ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %7$s.', null], + SAI_ACTION_EQUIP => ['(%8$d)?Unequip non-standard items:Equip %7$s;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not nessecarily have an item template'], + SAI_ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', null], + SAI_ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', null], + SAI_ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', null], + SAI_ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', null], + SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI-Events.', null], + SAI_ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI-Events.', null], + SAI_ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', null], + SAI_ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', null], +/* 80*/ SAI_ACTION_CALL_TIMED_ACTIONLIST => ['Call [html]Timed Actionlist #%1$d[/html]. Updates %7$s.', null], + SAI_ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %7$s.', null], + SAI_ACTION_ADD_NPC_FLAG => ['Add %7$s npc flags to #target#.', null], + SAI_ACTION_REMOVE_NPC_FLAG => ['Remove %7$s npc flags from #target#.', null], + SAI_ACTION_SIMPLE_TALK => ['#target# says (%7$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%7$s', null], + SAI_ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.', null], + SAI_ACTION_CROSS_CAST => ['%7$s casts [spell=%1$d] at #target#.', null], + SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: [html]%7$s[/html]', null], + SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: [html]%7$s[/html]', null], + SAI_ACTION_RANDOM_MOVE => ['Move #target# to a random point within %1$dm.', null], +/* 90*/ SAI_ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %7$s for #target#.', null], + SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %7$s for #target#.', null], + SAI_ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Instantly:Delayed;'], + SAI_ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', null], + SAI_ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %7$s on #target#.', null], + SAI_ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %7$s to #target#.', null], + SAI_ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %7$s from #target#.', null], + SAI_ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f, [i]v[/i][sub]xy[/sub]: %1$.2f [i]v[/i][sub]z[/sub]: %2$.2f[/b]', null], + SAI_ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', null], + SAI_ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %7$s.', null], +/*100*/ SAI_ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', null], + SAI_ACTION_SET_HOME_POS => ['Set Home Position to (%10$d)?current position.:fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b];', null], + SAI_ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', null], + SAI_ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', null], + SAI_ACTION_SET_GO_FLAG => ['Set GameObject Flag to %7$s on #target#.', null], + SAI_ACTION_ADD_GO_FLAG => ['Add GameObject Flag %7$s to #target#.', null], + SAI_ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %7$s from #target#.', null], + SAI_ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%7$s)?[span class=breadcrumb-arrow] [/span]%7$s:[span class=q0][/span];', null], + SAI_ACTION_SET_POWER => ['%7$s is set to [b]%2$d[/b] for #target#.', null], + SAI_ACTION_ADD_POWER => ['Add [b]%2$d[/b] %7$s to #target#.', null], +/*110*/ SAI_ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %7$s from #target#.', null], + SAI_ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', null], + SAI_ACTION_GAME_EVENT_START => ['Start [event=%1$d].', null], + SAI_ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %7$s.', null], + SAI_ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b]', null], + SAI_ACTION_RANDOM_SOUND => ['Play a random sound(%5$d)? to invoking player:;:[div float=right width=270px]%7$s[/div]', 'Played by environment.'], + SAI_ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %7$s.', null], + SAI_ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', null], + SAI_ACTION_GO_SET_GO_STATE => ['Set gameobject state to %7$s.'. null], + SAI_ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', null], +/*120*/ SAI_ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%7$s[/b] from #target#.', null], + SAI_ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', null], + SAI_ACTION_FLEE => ['#target# flees for assistance for %7$s.', null], + SAI_ACTION_ADD_THREAT => ['Modify threat level of #target# by %7$d points.', null], + SAI_ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %7$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not nessecarily have an item template'], + SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %7$s.', null], + SAI_ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', null], + SAI_ACTION_STOP_MOTION => ['(%1$d)?Remove motion type #[b]%1$d[/b] from #target#. :;(%2$d)?Stop moving.:;', null], + ), + 'targetUNK' => '[span class=q10]unknown target #[b class=q1]%d[/b][/span]', + 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%.2f[/td][/tr][tr][td]Y[/td][td=header]%.2f[/td][/tr][tr][td]Z[/td][td=header]%.2f[/td][/tr][tr][td]O[/td][td=header]%.2f[/td][/tr][/table]', + 'targets' => array( + null, + SAI_TARGET_SELF => 'self', + SAI_TARGET_VICTIM => 'current target', + SAI_TARGET_HOSTILE_SECOND_AGGRO => '2nd in threat list', + SAI_TARGET_HOSTILE_LAST_AGGRO => 'last in threat list', + SAI_TARGET_HOSTILE_RANDOM => 'random target', + SAI_TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank target', + SAI_TARGET_ACTION_INVOKER => 'Invoker', + SAI_TARGET_POSITION => 'world coordinates', + SAI_TARGET_CREATURE_RANGE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %4$sm', +/*10*/ SAI_TARGET_CREATURE_GUID => '(%4$d)?[npc=%4$d]:NPC; with GUID #%1$d', + SAI_TARGET_CREATURE_DISTANCE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %4$sm', + SAI_TARGET_STORED => 'previously stored targets', + SAI_TARGET_GAMEOBJECT_RANGE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %4$sm', + SAI_TARGET_GAMEOBJECT_GUID => '(%4$d)?[object=%4$d]:gameobject; with GUID #%1$d', + SAI_TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %4$sm', + SAI_TARGET_INVOKER_PARTY => 'Invokers party', + SAI_TARGET_PLAYER_RANGE => 'random player within %4$sm', + SAI_TARGET_PLAYER_DISTANCE => 'random player within %4$sm', + SAI_TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:arbitrary creature; within %4$sm', +/*20*/ SAI_TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:arbitrary gameobject; within %4$sm', + SAI_TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', + SAI_TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', + SAI_TARGET_OWNER_OR_SUMMONER => 'Invokers owner or summoner', + SAI_TARGET_THREAT_LIST => 'all units engaged in combat with self', + SAI_TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:enemy; within %1$dm', + SAI_TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:creature; within %1$dm', + SAI_TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', + SAI_TARGET_FARTHEST => 'furthest engaged (%2$d)?player:creature; within %1$dm(%3$d)? and line of sight:;', + SAI_TARGET_VEHICLE_ACCESSORY => 'accessory in Invokers vehicle in seat %1$d' + ), + 'castFlags' => array( + SAI_CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', + SAI_CAST_FLAG_TRIGGERED => 'Triggered', + SAI_CAST_FLAG_AURA_MISSING => 'Aura missing', + SAI_CAST_FLAG_COMBAT_MOVE => 'Combat movement' + ), + 'GOStates' => ['active', 'ready', 'active alternative'], + 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], + 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], + 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], + 'sheaths' => ['all', 'melee', 'ranged'], + 'saiUpdate' => ['out of combat', 'in combat', 'always'], + 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], + + 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', + 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', + 'aiTplUNK' => '[span class=q10]unknown AI-Template #[b class=q1]%d[/b][/span]', + 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', + 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', + 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', + 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', + + 'empty' => '[span class=q0][/span]' ), 'account' => array( 'title' => "Aowow Account", @@ -461,7 +827,17 @@ $lang = array( 'triggeredBy' => "Triggered by", 'capturePoint' => "Capture Point", 'foundIn' => "This object can be found in", - 'restock' => "Restocks every %s." + 'restock' => "Restocks every %s.", + 'goFlags' => array( + GO_FLAG_IN_USE => 'In use', + GO_FLAG_LOCKED => 'Locked', + GO_FLAG_INTERACT_COND => 'Cannot interact', + GO_FLAG_TRANSPORT => 'Transport', + GO_FLAG_NOT_SELECTABLE => 'Not selectable', + GO_FLAG_TRIGGERED => 'Triggered', + GO_FLAG_DAMAGED => 'Siege damaged', + GO_FLAG_DESTROYED => 'Siege destroyed' + ) ), 'npc' => array( 'notFound' => "This NPC doesn't exist.", @@ -499,6 +875,32 @@ $lang = array( "Uncategorized", "Beasts", "Dragonkins", "Demons", "Elementals", "Giants", "Undead", "Humanoids", "Critters", "Mechanicals", "Not specified", "Totems", "Non-combat Pets", "Gas Clouds" ), + 'npcFlags' => array( + NPC_FLAG_GOSSIP => 'Gossip', + NPC_FLAG_QUEST_GIVER => 'Quest Giver', + NPC_FLAG_TRAINER => 'Trainer', + NPC_FLAG_CLASS_TRAINER => 'Class Trainer', + NPC_PROFESSION_TRAINER => 'Profession Trainer', + NPC_FLAG_VENDOR => 'Vendor', + NPC_FLAG_VENDOR_AMMO => 'Ammo Vendor', + NPC_FLAG_VENDOR_FOOD => 'Food Vendor', + NPC_FLAG_VENDOR_POISON => 'Poison Vendor', + NPC_FLAG_VENDOR_REAGENT => 'Reagent Vendor', + NPC_FLAG_REPAIRER => 'Repair', + NPC_FLAG_FLIGHT_MASTER => 'Flight Master', + NPC_FLAG_SPIRIT_HEALER => 'Spirit Healer', + NPC_FLAG_SPIRIT_GUIDE => 'Spirit Guide', + NPC_FLAG_INNKEEPER => 'Innkeeper', + NPC_FLAG_BANKER => 'Banker', + NPC_FLAG_PETITIONER => 'Petitioner', + NPC_FLAG_GUILD_MASTER => 'Guild Master', + NPC_FLAG_BATTLEMASTER => 'Battle Master', + NPC_FLAG_AUCTIONEER => 'Auctioneer', + NPC_FLAG_STABLE_MASTER => 'Stable Master', + NPC_FLAG_GUILD_BANK => 'Guild Bank', + NPC_FLAG_SPELLCLICK => 'Spellclick', + NPC_FLAG_MAILBOX => 'Mailbox' + ) ), 'event' => array( 'notFound' => "This world event doesn't exist.", diff --git a/localization/locale_eses.php b/localization/locale_eses.php index 8b7f1adb..322a00b7 100644 --- a/localization/locale_eses.php +++ b/localization/locale_eses.php @@ -336,6 +336,372 @@ $lang = array( "Campeón caballero / Centurion", "Teniente coronel / Campeón", "Comandante / Teniente general", "Mariscal / General", "Mariscal de campo / Señor de la Guerra", "Gran mariscal / Gran Señor de la Guerra" ), + 'orientation' => ['North', 'Northeast', 'East', 'Southeast', 'South', 'Southwest', 'West', 'Northwest'] + ), + 'unit' => array( + 'flags' => array( + UNIT_FLAG_SERVER_CONTROLLED => 'Server controlled', + UNIT_FLAG_NON_ATTACKABLE => 'Not attackable', + UNIT_FLAG_REMOVE_CLIENT_CONTROL => 'Remove client control', + UNIT_FLAG_PVP_ATTACKABLE => 'PvP attackable', + UNIT_FLAG_RENAME => 'Rename', + UNIT_FLAG_PREPARATION => 'Arena preparation', + UNIT_FLAG_UNK_6 => 'UNK-6', + UNIT_FLAG_NOT_ATTACKABLE_1 => 'Not Attackable', + UNIT_FLAG_IMMUNE_TO_PC => 'Immune to players', + UNIT_FLAG_IMMUNE_TO_NPC => 'Immune to creatures', + UNIT_FLAG_LOOTING => 'Loot animation', + UNIT_FLAG_PET_IN_COMBAT => 'Pet in combat', + UNIT_FLAG_PVP => 'PvP', + UNIT_FLAG_SILENCED => 'Silenced', + UNIT_FLAG_CANNOT_SWIM => 'Cannot swim', + UNIT_FLAG_UNK_15 => 'UNK-15 (can only swim)', + UNIT_FLAG_UNK_16 => 'UNK-16 (cannot attack)', + UNIT_FLAG_PACIFIED => 'Pacified', + UNIT_FLAG_STUNNED => 'Stunned', + UNIT_FLAG_IN_COMBAT => 'In combat', + UNIT_FLAG_TAXI_FLIGHT => 'Taxi flight', + UNIT_FLAG_DISARMED => 'Disarmed', + UNIT_FLAG_CONFUSED => 'Confused', + UNIT_FLAG_FLEEING => 'Fleeing', + UNIT_FLAG_PLAYER_CONTROLLED => 'Player controlled', + UNIT_FLAG_NOT_SELECTABLE => 'Not selectable', + UNIT_FLAG_SKINNABLE => 'Skinnable', + UNIT_FLAG_MOUNT => 'Mounted', + UNIT_FLAG_UNK_28 => 'UNK-28', + UNIT_FLAG_UNK_29 => 'UNK-29 (Prevent emotes)', + UNIT_FLAG_SHEATHE => 'Sheathe weapon', + UNIT_FLAG_UNK_31 => 'UNK-31' + ), + 'flags2' => array( + UNIT_FLAG2_FEIGN_DEATH => 'Feign Death', + UNIT_FLAG2_UNK1 => 'UNK-1 (hide unit model)', + UNIT_FLAG2_IGNORE_REPUTATION => 'Ignore reputation', + UNIT_FLAG2_COMPREHEND_LANG => 'Comprehend language', + UNIT_FLAG2_MIRROR_IMAGE => 'Mirror Image', + UNIT_FLAG2_INSTANTLY_APPEAR_MODEL => 'Instant spawn', + UNIT_FLAG2_FORCE_MOVEMENT => 'Force movement', + UNIT_FLAG2_DISARM_OFFHAND => 'Disarm offhand weapon', + UNIT_FLAG2_DISABLE_PRED_STATS => 'Disable predicted stats', + UNIT_FLAG2_DISARM_RANGED => 'Disarm ranged weapon', + UNIT_FLAG2_REGENERATE_POWER => 'Regenerate power', + UNIT_FLAG2_RESTRICT_PARTY_INTERACTION => 'Restrict party interaction', + UNIT_FLAG2_PREVENT_SPELL_CLICK => 'Prevent spell click', + UNIT_FLAG2_ALLOW_ENEMY_INTERACT => 'Allow enemy interaction', + UNIT_FLAG2_DISABLE_TURN => 'Disable turn', + UNIT_FLAG2_UNK2 => 'UNK-2', + UNIT_FLAG2_PLAY_DEATH_ANIM => 'Play special death animation', + UNIT_FLAG2_ALLOW_CHEAT_SPELLS => 'allow cheat spells' + ), + 'dynFlags' => array( + UNIT_DYNFLAG_LOOTABLE => 'Lootable', + UNIT_DYNFLAG_TRACK_UNIT => 'Tracked', + UNIT_DYNFLAG_TAPPED => 'Tapped', + UNIT_DYNFLAG_TAPPED_BY_PLAYER => 'Tapped by player', + UNIT_DYNFLAG_SPECIALINFO => 'Special info', + UNIT_DYNFLAG_DEAD => 'Dead', + UNIT_DYNFLAG_REFER_A_FRIEND => 'Refer-a-friend', + UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST => 'Tapped by all threat list' + ), + 'bytes1' => array( +/*idx:0*/ ['Standing', 'Sitting on ground', 'Sitting on chair', 'Sleeping', 'Sitting on low chair', 'Sitting on medium chair', 'Sitting on high chair', 'Dead', 'Kneeing', 'Submerged'], // STAND_STATE_* + null, +/*idx:2*/ array( + UNIT_STAND_FLAGS_UNK1 => 'UNK-1', + UNIT_STAND_FLAGS_CREEP => 'Creep', + UNIT_STAND_FLAGS_UNTRACKABLE => 'Untrackable', + UNIT_STAND_FLAGS_UNK4 => 'UNK-4', + UNIT_STAND_FLAGS_UNK5 => 'UNK-5' + ), +/*idx:3*/ array( + UNIT_BYTE1_FLAG_ALWAYS_STAND => 'Always standing', + UNIT_BYTE1_FLAG_HOVER => 'Hovering', + UNIT_BYTE1_FLAG_UNK_3 => 'UNK-3' + ), + 'valueUNK' => '[span class=q10]unhandled value [b class=q1]%d[/b] provided for UnitFieldBytes1 on offset [b class=q1]%d[/b][/span]', + 'idxUNK' => '[span class=q10]unused offset [b class=q1]%d[/b] provided for UnitFieldBytes1[/span]' + ) + ), + 'smartAI' => array( + 'eventUNK' => '[span class=q10]Unknwon event #[b class=q1]%d[/b] in use.[/span]', + 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', + 'events' => array( + SAI_EVENT_UPDATE_IC => ['(%7$d)?:When in combat, ;(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_UPDATE_OOC => ['(%7$d)?:When out of combat, ;(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_HEALT_PCT => ['At %6$s%% Health', 'Repeat every %s'], + SAI_EVENT_MANA_PCT => ['At %6$s%% Mana', 'Repeat every %s'], + SAI_EVENT_AGGRO => ['On Aggro', null], + SAI_EVENT_KILL => ['On killing (%3$d)?player:;(%4$d)?[npc=%4$d]:any creature;', 'Cooldown: %s'], + SAI_EVENT_DEATH => ['On death', null], + SAI_EVENT_EVADE => ['When evading', null], + SAI_EVENT_SPELLHIT => ['When hit by (%6$s)?%6$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SAI_EVENT_RANGE => ['On target at %6$sm', 'Repeat every %s'], +/* 10*/ SAI_EVENT_OOC_LOS => ['While out of combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SAI_EVENT_RESPAWN => ['On respawn', null], + SAI_EVENT_TARGET_HEALTH_PCT => ['On target at %6$s%% health', 'Repeat every %s'], + SAI_EVENT_VICTIM_CASTING => ['Current target is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], + SAI_EVENT_TARGET_MANA_PCT => ['On target at %6$s%% mana', 'Repeat every %s'], + SAI_EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', null], +/* 20*/ SAI_EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', null], + SAI_EVENT_REACHED_HOME => ['Arriving at home coordinates', null], + SAI_EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], + SAI_EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_RESET => ['On reset', null], + SAI_EVENT_IC_LOS => ['While in combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SAI_EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], + SAI_EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], + SAI_EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', null], +/* 30*/ SAI_EVENT_CHARMED_TARGET => ['When charming #target#', null], + SAI_EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%6$s)?%6$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SAI_EVENT_DAMAGED => ['After taking %6$s points of damage', 'Repeat every %s'], + SAI_EVENT_DAMAGED_TARGET => ['After #target# took %6$s points of damage', 'Repeat every %s'], + SAI_EVENT_MOVEMENTINFORM => ['Started moving to point #[b]%2$d[/b](%1$d)? using MotionType #[b]%1$d[/b]:;', null], + SAI_EVENT_SUMMON_DESPAWNED => ['Summoned [npc=%1$d] despawned', 'Cooldown: %s'], + SAI_EVENT_CORPSE_REMOVED => ['On corpse despawn', null], + SAI_EVENT_AI_INIT => ['AI initialized', null], + SAI_EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], + SAI_EVENT_WAYPOINT_START => ['Start pathing on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], +/* 40*/ SAI_EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + null, + null, + null, + null, + null, + SAI_EVENT_AREATRIGGER_ONTRIGGER => ['On activation', null], + null, + null, + null, +/* 50*/ null, + null, + SAI_EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', null], + SAI_EVENT_RECEIVE_HEAL => ['Received %6$s points of healing', 'Cooldown: %s'], + SAI_EVENT_JUST_SUMMONED => ['On being summoned', null], + SAI_EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', null], +/* 60*/ SAI_EVENT_UPDATE => ['(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_LINK => ['After Event %6$s', null], + SAI_EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%6$s)?[span class=q1]%6$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', null], + SAI_EVENT_JUST_CREATED => ['On being spawned for the first time', null], + SAI_EVENT_GOSSIP_HELLO => ['Opening Gossip', null], + SAI_EVENT_FOLLOW_COMPLETED => ['Finished following', null], + SAI_EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %6$s', null], + SAI_EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], + SAI_EVENT_GAME_EVENT_START => ['[event=%1$d] started', null], + SAI_EVENT_GAME_EVENT_END => ['[event=%1$d] ended', null], +/* 70*/ SAI_EVENT_GO_STATE_CHANGED => ['State has changed', null], + SAI_EVENT_GO_EVENT_INFORM => ['Taxi path event #[b]%1$d[/b] trigered', null], + SAI_EVENT_ACTION_DONE => ['Executed action #[b]%1$d[/b] requested by script', null], + SAI_EVENT_ON_SPELLCLICK => ['Spellclick triggered', null], + SAI_EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %6$s%%', 'Repeat every %s'], + SAI_EVENT_DISTANCE_CREATURE => ['[npc=%6$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], + SAI_EVENT_DISTANCE_GAMEOBJECT => ['[object=%6$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], + SAI_EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', null], + ), + 'eventFlags' => array( + SAI_EVENT_FLAG_NO_REPEAT => 'No Repeat', + SAI_EVENT_FLAG_DIFFICULTY_0 => 'Normal Dungeon', + SAI_EVENT_FLAG_DIFFICULTY_1 => 'Heroic Dungeon', + SAI_EVENT_FLAG_DIFFICULTY_2 => 'Normal Raid', + SAI_EVENT_FLAG_DIFFICULTY_3 => 'Heroic Raid', + SAI_EVENT_FLAG_NO_RESET => 'No Reset', + SAI_EVENT_FLAG_WHILE_CHARMED => 'While Charmed' + ), + 'actionUNK' => '[span class=q10]Unknown action #[b class=q1]%d[/b] in use.[/span]', + 'actionTT' => '[b class=q1]ActionType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][tr][td]Param6[/td][td=header]%d[/td][/tr][/table]', + 'actions' => array( // [body, footer] + null, + SAI_ACTION_TALK => ['(%3$d)?Say:#target# says; (%7$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%8$s', 'Duration: %s'], + SAI_ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%7$d]:Reset faction of #target#;.', null], + SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%7$d)?Reset apperance.:Take the appearance of;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], + SAI_ACTION_SOUND => ['Play sound(%2$d)? to invoking player:;:[div float=right width=270px][sound=%1$d][/div]', 'Played by environment.'], + SAI_ACTION_PLAY_EMOTE => ['Emote [emote=%1$d] to #target#.', null], + SAI_ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', null], + SAI_ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', null], + SAI_ACTION_SET_REACT_STATE => ['#target# becomes %7$s.', null], + SAI_ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', null], +/* 10*/ SAI_ACTION_RANDOM_EMOTE => ['Emote %7$s to #target#.', null], + SAI_ACTION_CAST => ['Cast [spell=%1$d] at #target#.', null], + SAI_ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %7$d:;(%4$d)?, attacking invoker:;.', null], + SAI_ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %7$d%%.', null], + SAI_ACTION_THREAT_ALL_PCT => ['Modify the threat of all targets by %7$d%%.', null], + SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Exploration event of [quest=%1$d] is completed for #target#.', null], + SAI_ACTION_SET_EMOTE_STATE => ['Continuously emote [emote=%1$d] to #target#.', null], + SAI_ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], + SAI_ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], +/* 20*/ SAI_ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', null], + SAI_ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', null], + SAI_ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', null], + SAI_ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', null], + SAI_ACTION_EVADE => ['#target# enters Evade Mode.', null], + SAI_ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], + SAI_ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy objective of [quest=%1$d] for #target#.', null], + SAI_ACTION_COMBAT_STOP => ['End current combat.', null], + SAI_ACTION_REMOVEAURASFROMSPELL => ['Remove (%1$d)?all auras:auras of [spell=%1$d]; from #target#.', null], + SAI_ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.', '(%7$d)?Angle: %7$.2f°:;(%8$d)? Some form of Quest Credit is given:;'], +/* 30*/ SAI_ACTION_RANDOM_PHASE => ['Pick random Event Phase from %7$s.', null], + SAI_ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', null], + SAI_ACTION_RESET_GOBJECT => ['Reset #target#.', null], + SAI_ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to #target#.', null], + SAI_ACTION_SET_INST_DATA => ['Set Instance (%3$d)?Boss State:Data Field; #[b]]%1$d[/b] to [b]%2$d[/b].', null], + null, + SAI_ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d](%2$d)? with level [b]%2$d[/b]:;.', null], + SAI_ACTION_DIE => ['Die...   painfully.', null], + SAI_ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', null], + SAI_ACTION_CALL_FOR_HELP => ['Call for help.', 'Use default help emote'], +/* 40*/ SAI_ACTION_SET_SHEATH => ['Sheath %7$s weapons.', null], + SAI_ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %7$s:;(%2$d)? and then respawn after %8$s:;.', null], + SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become invincable below (%2$d)?%2$d%%:%1$d; HP.', null], + SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%7$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], + SAI_ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %7$s.', null], + SAI_ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', null], + null, + SAI_ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', null], + SAI_ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', null], + SAI_ACTION_ATTACK_START => ['Start attacking #target#.', null], +/* 50*/ SAI_ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for ?%7$d:; at #target#.', 'Despawn linked to summoner'], + SAI_ACTION_KILL_UNIT => ['#target# dies!', null], + SAI_ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%7$s[/span] to [span class=q1]%8$s[/span]', null], + SAI_ACTION_WP_START => ['(%1$d)?Walk:Run; on waypoint path #[b]%2$d[/b].(%4$d)? Is linked to [quest=%4$d].:; React %8$s while following the path.(%5$d)? Despawn after %7$s.:;', 'Repeatable'], + SAI_ACTION_WP_PAUSE => ['Pause waypoint path for %7$d.', null], + SAI_ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %7$s:;.(%8$d)? [quest=%2$d] fails.:;(%9$d)? [quest=%2$d] is completed.:;', null], + SAI_ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', null], + SAI_ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', null], + SAI_ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %7$s.', null], + SAI_ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', null], +/* 60*/ SAI_ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', null], + SAI_ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', null], + SAI_ACTION_TELEPORT => ['#target# is teleported to [zone=%7$d].', null], + SAI_ACTION_SET_COUNTER => ['(%3$d)?Reset:Increase; Counter #[b]%1$d[/b] of #target#(%3$d)?: by [b]%2$d[/b];.', null], + SAI_ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', null], + SAI_ACTION_WP_RESUME => ['Continue on waypoint path.', null], + SAI_ACTION_SET_ORIENTATION => ['Set orientation to (%7$s)?face %7$s:Home Position;.', null], + SAI_ACTION_CREATE_TIMED_EVENT => ['(%8$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%7$s)? after %7$s:;.', 'Repeat every %s'], + SAI_ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', null], + SAI_ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], +/* 70*/ SAI_ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %7$s.', null], + SAI_ACTION_EQUIP => ['(%8$d)?Unequip non-standard items:Equip %7$s;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not nessecarily have an item template'], + SAI_ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', null], + SAI_ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', null], + SAI_ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', null], + SAI_ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', null], + SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI-Events.', null], + SAI_ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI-Events.', null], + SAI_ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', null], + SAI_ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', null], +/* 80*/ SAI_ACTION_CALL_TIMED_ACTIONLIST => ['Call [html]Timed Actionlist #%1$d[/html]. Updates %7$s.', null], + SAI_ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %7$s.', null], + SAI_ACTION_ADD_NPC_FLAG => ['Add %7$s npc flags to #target#.', null], + SAI_ACTION_REMOVE_NPC_FLAG => ['Remove %7$s npc flags from #target#.', null], + SAI_ACTION_SIMPLE_TALK => ['#target# says (%7$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%7$s', null], + SAI_ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.', null], + SAI_ACTION_CROSS_CAST => ['%7$s casts [spell=%1$d] at #target#.', null], + SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: [html]%7$s[/html]', null], + SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: [html]%7$s[/html]', null], + SAI_ACTION_RANDOM_MOVE => ['Move #target# to a random point within %1$dm.', null], +/* 90*/ SAI_ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %7$s for #target#.', null], + SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %7$s for #target#.', null], + SAI_ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Instantly:Delayed;'], + SAI_ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', null], + SAI_ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %7$s on #target#.', null], + SAI_ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %7$s to #target#.', null], + SAI_ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %7$s from #target#.', null], + SAI_ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f, [i]v[/i][sub]xy[/sub]: %1$.2f [i]v[/i][sub]z[/sub]: %2$.2f[/b]', null], + SAI_ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', null], + SAI_ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %7$s.', null], +/*100*/ SAI_ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', null], + SAI_ACTION_SET_HOME_POS => ['Set Home Position to (%10$d)?current position.:fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b];', null], + SAI_ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', null], + SAI_ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', null], + SAI_ACTION_SET_GO_FLAG => ['Set GameObject Flag to %7$s on #target#.', null], + SAI_ACTION_ADD_GO_FLAG => ['Add GameObject Flag %7$s to #target#.', null], + SAI_ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %7$s from #target#.', null], + SAI_ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%7$s)?[span class=breadcrumb-arrow] [/span]%7$s:[span class=q0][/span];', null], + SAI_ACTION_SET_POWER => ['%7$s is set to [b]%2$d[/b] for #target#.', null], + SAI_ACTION_ADD_POWER => ['Add [b]%2$d[/b] %7$s to #target#.', null], +/*110*/ SAI_ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %7$s from #target#.', null], + SAI_ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', null], + SAI_ACTION_GAME_EVENT_START => ['Start [event=%1$d].', null], + SAI_ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %7$s.', null], + SAI_ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b]', null], + SAI_ACTION_RANDOM_SOUND => ['Play a random sound(%5$d)? to invoking player:;:[div float=right width=270px]%7$s[/div]', 'Played by environment.'], + SAI_ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %7$s.', null], + SAI_ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', null], + SAI_ACTION_GO_SET_GO_STATE => ['Set gameobject state to %7$s.'. null], + SAI_ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', null], +/*120*/ SAI_ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%7$s[/b] from #target#.', null], + SAI_ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', null], + SAI_ACTION_FLEE => ['#target# flees for assistance for %7$s.', null], + SAI_ACTION_ADD_THREAT => ['Modify threat level of #target# by %7$d points.', null], + SAI_ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %7$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not nessecarily have an item template'], + SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %7$s.', null], + SAI_ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', null], + SAI_ACTION_STOP_MOTION => ['(%1$d)?Remove motion type #[b]%1$d[/b] from #target#. :;(%2$d)?Stop moving.:;', null], + ), + 'targetUNK' => '[span class=q10]unknown target #[b class=q1]%d[/b][/span]', + 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%.2f[/td][/tr][tr][td]Y[/td][td=header]%.2f[/td][/tr][tr][td]Z[/td][td=header]%.2f[/td][/tr][tr][td]O[/td][td=header]%.2f[/td][/tr][/table]', + 'targets' => array( + null, + SAI_TARGET_SELF => 'self', + SAI_TARGET_VICTIM => 'current target', + SAI_TARGET_HOSTILE_SECOND_AGGRO => '2nd in threat list', + SAI_TARGET_HOSTILE_LAST_AGGRO => 'last in threat list', + SAI_TARGET_HOSTILE_RANDOM => 'random target', + SAI_TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank target', + SAI_TARGET_ACTION_INVOKER => 'Invoker', + SAI_TARGET_POSITION => 'world coordinates', + SAI_TARGET_CREATURE_RANGE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %4$sm', +/*10*/ SAI_TARGET_CREATURE_GUID => '(%4$d)?[npc=%4$d]:NPC; with GUID #%1$d', + SAI_TARGET_CREATURE_DISTANCE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %4$sm', + SAI_TARGET_STORED => 'previously stored targets', + SAI_TARGET_GAMEOBJECT_RANGE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %4$sm', + SAI_TARGET_GAMEOBJECT_GUID => '(%4$d)?[object=%4$d]:gameobject; with GUID #%1$d', + SAI_TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %4$sm', + SAI_TARGET_INVOKER_PARTY => 'Invokers party', + SAI_TARGET_PLAYER_RANGE => 'random player within %4$sm', + SAI_TARGET_PLAYER_DISTANCE => 'random player within %4$sm', + SAI_TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:arbitrary creature; within %4$sm', +/*20*/ SAI_TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:arbitrary gameobject; within %4$sm', + SAI_TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', + SAI_TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', + SAI_TARGET_OWNER_OR_SUMMONER => 'Invokers owner or summoner', + SAI_TARGET_THREAT_LIST => 'all units engaged in combat with self', + SAI_TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:enemy; within %1$dm', + SAI_TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:creature; within %1$dm', + SAI_TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', + SAI_TARGET_FARTHEST => 'furthest engaged (%2$d)?player:creature; within %1$dm(%3$d)? and line of sight:;', + SAI_TARGET_VEHICLE_ACCESSORY => 'accessory in Invokers vehicle in seat %1$d' + ), + 'castFlags' => array( + SAI_CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', + SAI_CAST_FLAG_TRIGGERED => 'Triggered', + SAI_CAST_FLAG_AURA_MISSING => 'Aura missing', + SAI_CAST_FLAG_COMBAT_MOVE => 'Combat movement' + ), + 'GOStates' => ['active', 'ready', 'active alternative'], + 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], + 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], + 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], + 'sheaths' => ['all', 'melee', 'ranged'], + 'saiUpdate' => ['out of combat', 'in combat', 'always'], + 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], + + 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', + 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', + 'aiTplUNK' => '[span class=q10]unknown AI-Template #[b class=q1]%d[/b][/span]', + 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', + 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', + 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', + 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', + + 'empty' => '[span class=q0][/span]' ), 'account' => array( 'title' => "Cuenta de Aowow", @@ -461,7 +827,17 @@ $lang = array( 'triggeredBy' => "Accionado por", 'capturePoint' => "Punto de captura", 'foundIn' => "Este entidad se puede encontrar en", - 'restock' => "Se renueva cada %s." + 'restock' => "Se renueva cada %s.", + 'goFlags' => array( + GO_FLAG_IN_USE => 'In use', + GO_FLAG_LOCKED => 'Locked', + GO_FLAG_INTERACT_COND => 'Cannot interact', + GO_FLAG_TRANSPORT => 'Transport', + GO_FLAG_NOT_SELECTABLE => 'Not selectable', + GO_FLAG_TRIGGERED => 'Triggered', + GO_FLAG_DAMAGED => 'Siege damaged', + GO_FLAG_DESTROYED => 'Siege destroyed' + ) ), 'npc' => array( 'notFound' => "Este PNJ no existe.", @@ -498,6 +874,32 @@ $lang = array( 'cat' => array( "Sin categoría", "Bestia", "Dragonante", "Demonio", "Elemental", "Gigante", "No-muerto", "Humanoide", "Alimaña", "Mecánico", "Sin especificar", "Tótem", "Mascota mansa", "Nube de gas" + ), + 'npcFlags' => array( + NPC_FLAG_GOSSIP => 'Gossip', + NPC_FLAG_QUEST_GIVER => 'Quest Giver', + NPC_FLAG_TRAINER => 'Trainer', + NPC_FLAG_CLASS_TRAINER => 'Class Trainer', + NPC_PROFESSION_TRAINER => 'Profession Trainer', + NPC_FLAG_VENDOR => 'Vendor', + NPC_FLAG_VENDOR_AMMO => 'Ammo Vendor', + NPC_FLAG_VENDOR_FOOD => 'Food Vendor', + NPC_FLAG_VENDOR_POISON => 'Poison Vendor', + NPC_FLAG_VENDOR_REAGENT => 'Reagent Vendor', + NPC_FLAG_REPAIRER => 'Repair', + NPC_FLAG_FLIGHT_MASTER => 'Flight Master', + NPC_FLAG_SPIRIT_HEALER => 'Spirit Healer', + NPC_FLAG_SPIRIT_GUIDE => 'Spirit Guide', + NPC_FLAG_INNKEEPER => 'Innkeeper', + NPC_FLAG_BANKER => 'Banker', + NPC_FLAG_PETITIONER => 'Petitioner', + NPC_FLAG_GUILD_MASTER => 'Guild Master', + NPC_FLAG_BATTLEMASTER => 'Battle Master', + NPC_FLAG_AUCTIONEER => 'Auctioneer', + NPC_FLAG_STABLE_MASTER => 'Stable Master', + NPC_FLAG_GUILD_BANK => 'Guild Bank', + NPC_FLAG_SPELLCLICK => 'Spellclick', + NPC_FLAG_MAILBOX => 'Mailbox' ) ), 'event' => array( diff --git a/localization/locale_frfr.php b/localization/locale_frfr.php index 01cf16f4..63d68427 100644 --- a/localization/locale_frfr.php +++ b/localization/locale_frfr.php @@ -336,6 +336,372 @@ $lang = array( "Knight-Champion / Centurion", "Lieutenant Commander / Champion", "Commander / Lieutenant General", "Marshal / General", "Field Marshal / Warlord", "Grand Marshal / High Warlord" ), + 'orientation' => ['North', 'Northeast', 'East', 'Southeast', 'South', 'Southwest', 'West', 'Northwest'] + ), + 'unit' => array( + 'flags' => array( + UNIT_FLAG_SERVER_CONTROLLED => 'Server controlled', + UNIT_FLAG_NON_ATTACKABLE => 'Not attackable', + UNIT_FLAG_REMOVE_CLIENT_CONTROL => 'Remove client control', + UNIT_FLAG_PVP_ATTACKABLE => 'PvP attackable', + UNIT_FLAG_RENAME => 'Rename', + UNIT_FLAG_PREPARATION => 'Arena preparation', + UNIT_FLAG_UNK_6 => 'UNK-6', + UNIT_FLAG_NOT_ATTACKABLE_1 => 'Not Attackable', + UNIT_FLAG_IMMUNE_TO_PC => 'Immune to players', + UNIT_FLAG_IMMUNE_TO_NPC => 'Immune to creatures', + UNIT_FLAG_LOOTING => 'Loot animation', + UNIT_FLAG_PET_IN_COMBAT => 'Pet in combat', + UNIT_FLAG_PVP => 'PvP', + UNIT_FLAG_SILENCED => 'Silenced', + UNIT_FLAG_CANNOT_SWIM => 'Cannot swim', + UNIT_FLAG_UNK_15 => 'UNK-15 (can only swim)', + UNIT_FLAG_UNK_16 => 'UNK-16 (cannot attack)', + UNIT_FLAG_PACIFIED => 'Pacified', + UNIT_FLAG_STUNNED => 'Stunned', + UNIT_FLAG_IN_COMBAT => 'In combat', + UNIT_FLAG_TAXI_FLIGHT => 'Taxi flight', + UNIT_FLAG_DISARMED => 'Disarmed', + UNIT_FLAG_CONFUSED => 'Confused', + UNIT_FLAG_FLEEING => 'Fleeing', + UNIT_FLAG_PLAYER_CONTROLLED => 'Player controlled', + UNIT_FLAG_NOT_SELECTABLE => 'Not selectable', + UNIT_FLAG_SKINNABLE => 'Skinnable', + UNIT_FLAG_MOUNT => 'Mounted', + UNIT_FLAG_UNK_28 => 'UNK-28', + UNIT_FLAG_UNK_29 => 'UNK-29 (Prevent emotes)', + UNIT_FLAG_SHEATHE => 'Sheathe weapon', + UNIT_FLAG_UNK_31 => 'UNK-31' + ), + 'flags2' => array( + UNIT_FLAG2_FEIGN_DEATH => 'Feign Death', + UNIT_FLAG2_UNK1 => 'UNK-1 (hide unit model)', + UNIT_FLAG2_IGNORE_REPUTATION => 'Ignore reputation', + UNIT_FLAG2_COMPREHEND_LANG => 'Comprehend language', + UNIT_FLAG2_MIRROR_IMAGE => 'Mirror Image', + UNIT_FLAG2_INSTANTLY_APPEAR_MODEL => 'Instant spawn', + UNIT_FLAG2_FORCE_MOVEMENT => 'Force movement', + UNIT_FLAG2_DISARM_OFFHAND => 'Disarm offhand weapon', + UNIT_FLAG2_DISABLE_PRED_STATS => 'Disable predicted stats', + UNIT_FLAG2_DISARM_RANGED => 'Disarm ranged weapon', + UNIT_FLAG2_REGENERATE_POWER => 'Regenerate power', + UNIT_FLAG2_RESTRICT_PARTY_INTERACTION => 'Restrict party interaction', + UNIT_FLAG2_PREVENT_SPELL_CLICK => 'Prevent spell click', + UNIT_FLAG2_ALLOW_ENEMY_INTERACT => 'Allow enemy interaction', + UNIT_FLAG2_DISABLE_TURN => 'Disable turn', + UNIT_FLAG2_UNK2 => 'UNK-2', + UNIT_FLAG2_PLAY_DEATH_ANIM => 'Play special death animation', + UNIT_FLAG2_ALLOW_CHEAT_SPELLS => 'allow cheat spells' + ), + 'dynFlags' => array( + UNIT_DYNFLAG_LOOTABLE => 'Lootable', + UNIT_DYNFLAG_TRACK_UNIT => 'Tracked', + UNIT_DYNFLAG_TAPPED => 'Tapped', + UNIT_DYNFLAG_TAPPED_BY_PLAYER => 'Tapped by player', + UNIT_DYNFLAG_SPECIALINFO => 'Special info', + UNIT_DYNFLAG_DEAD => 'Dead', + UNIT_DYNFLAG_REFER_A_FRIEND => 'Refer-a-friend', + UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST => 'Tapped by all threat list' + ), + 'bytes1' => array( +/*idx:0*/ ['Standing', 'Sitting on ground', 'Sitting on chair', 'Sleeping', 'Sitting on low chair', 'Sitting on medium chair', 'Sitting on high chair', 'Dead', 'Kneeing', 'Submerged'], // STAND_STATE_* + null, +/*idx:2*/ array( + UNIT_STAND_FLAGS_UNK1 => 'UNK-1', + UNIT_STAND_FLAGS_CREEP => 'Creep', + UNIT_STAND_FLAGS_UNTRACKABLE => 'Untrackable', + UNIT_STAND_FLAGS_UNK4 => 'UNK-4', + UNIT_STAND_FLAGS_UNK5 => 'UNK-5' + ), +/*idx:3*/ array( + UNIT_BYTE1_FLAG_ALWAYS_STAND => 'Always standing', + UNIT_BYTE1_FLAG_HOVER => 'Hovering', + UNIT_BYTE1_FLAG_UNK_3 => 'UNK-3' + ), + 'valueUNK' => '[span class=q10]unhandled value [b class=q1]%d[/b] provided for UnitFieldBytes1 on offset [b class=q1]%d[/b][/span]', + 'idxUNK' => '[span class=q10]unused offset [b class=q1]%d[/b] provided for UnitFieldBytes1[/span]' + ) + ), + 'smartAI' => array( + 'eventUNK' => '[span class=q10]Unknwon event #[b class=q1]%d[/b] in use.[/span]', + 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', + 'events' => array( + SAI_EVENT_UPDATE_IC => ['(%7$d)?:When in combat, ;(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_UPDATE_OOC => ['(%7$d)?:When out of combat, ;(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_HEALT_PCT => ['At %6$s%% Health', 'Repeat every %s'], + SAI_EVENT_MANA_PCT => ['At %6$s%% Mana', 'Repeat every %s'], + SAI_EVENT_AGGRO => ['On Aggro', null], + SAI_EVENT_KILL => ['On killing (%3$d)?player:;(%4$d)?[npc=%4$d]:any creature;', 'Cooldown: %s'], + SAI_EVENT_DEATH => ['On death', null], + SAI_EVENT_EVADE => ['When evading', null], + SAI_EVENT_SPELLHIT => ['When hit by (%6$s)?%6$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SAI_EVENT_RANGE => ['On target at %6$sm', 'Repeat every %s'], +/* 10*/ SAI_EVENT_OOC_LOS => ['While out of combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SAI_EVENT_RESPAWN => ['On respawn', null], + SAI_EVENT_TARGET_HEALTH_PCT => ['On target at %6$s%% health', 'Repeat every %s'], + SAI_EVENT_VICTIM_CASTING => ['Current target is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], + SAI_EVENT_TARGET_MANA_PCT => ['On target at %6$s%% mana', 'Repeat every %s'], + SAI_EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', null], +/* 20*/ SAI_EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', null], + SAI_EVENT_REACHED_HOME => ['Arriving at home coordinates', null], + SAI_EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], + SAI_EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_RESET => ['On reset', null], + SAI_EVENT_IC_LOS => ['While in combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SAI_EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], + SAI_EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], + SAI_EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', null], +/* 30*/ SAI_EVENT_CHARMED_TARGET => ['When charming #target#', null], + SAI_EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%6$s)?%6$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SAI_EVENT_DAMAGED => ['After taking %6$s points of damage', 'Repeat every %s'], + SAI_EVENT_DAMAGED_TARGET => ['After #target# took %6$s points of damage', 'Repeat every %s'], + SAI_EVENT_MOVEMENTINFORM => ['Started moving to point #[b]%2$d[/b](%1$d)? using MotionType #[b]%1$d[/b]:;', null], + SAI_EVENT_SUMMON_DESPAWNED => ['Summoned [npc=%1$d] despawned', 'Cooldown: %s'], + SAI_EVENT_CORPSE_REMOVED => ['On corpse despawn', null], + SAI_EVENT_AI_INIT => ['AI initialized', null], + SAI_EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], + SAI_EVENT_WAYPOINT_START => ['Start pathing on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], +/* 40*/ SAI_EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + null, + null, + null, + null, + null, + SAI_EVENT_AREATRIGGER_ONTRIGGER => ['On activation', null], + null, + null, + null, +/* 50*/ null, + null, + SAI_EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', null], + SAI_EVENT_RECEIVE_HEAL => ['Received %6$s points of healing', 'Cooldown: %s'], + SAI_EVENT_JUST_SUMMONED => ['On being summoned', null], + SAI_EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', null], +/* 60*/ SAI_EVENT_UPDATE => ['(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_LINK => ['After Event %6$s', null], + SAI_EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%6$s)?[span class=q1]%6$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', null], + SAI_EVENT_JUST_CREATED => ['On being spawned for the first time', null], + SAI_EVENT_GOSSIP_HELLO => ['Opening Gossip', null], + SAI_EVENT_FOLLOW_COMPLETED => ['Finished following', null], + SAI_EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %6$s', null], + SAI_EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], + SAI_EVENT_GAME_EVENT_START => ['[event=%1$d] started', null], + SAI_EVENT_GAME_EVENT_END => ['[event=%1$d] ended', null], +/* 70*/ SAI_EVENT_GO_STATE_CHANGED => ['State has changed', null], + SAI_EVENT_GO_EVENT_INFORM => ['Taxi path event #[b]%1$d[/b] trigered', null], + SAI_EVENT_ACTION_DONE => ['Executed action #[b]%1$d[/b] requested by script', null], + SAI_EVENT_ON_SPELLCLICK => ['Spellclick triggered', null], + SAI_EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %6$s%%', 'Repeat every %s'], + SAI_EVENT_DISTANCE_CREATURE => ['[npc=%6$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], + SAI_EVENT_DISTANCE_GAMEOBJECT => ['[object=%6$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], + SAI_EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', null], + ), + 'eventFlags' => array( + SAI_EVENT_FLAG_NO_REPEAT => 'No Repeat', + SAI_EVENT_FLAG_DIFFICULTY_0 => 'Normal Dungeon', + SAI_EVENT_FLAG_DIFFICULTY_1 => 'Heroic Dungeon', + SAI_EVENT_FLAG_DIFFICULTY_2 => 'Normal Raid', + SAI_EVENT_FLAG_DIFFICULTY_3 => 'Heroic Raid', + SAI_EVENT_FLAG_NO_RESET => 'No Reset', + SAI_EVENT_FLAG_WHILE_CHARMED => 'While Charmed' + ), + 'actionUNK' => '[span class=q10]Unknown action #[b class=q1]%d[/b] in use.[/span]', + 'actionTT' => '[b class=q1]ActionType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][tr][td]Param6[/td][td=header]%d[/td][/tr][/table]', + 'actions' => array( // [body, footer] + null, + SAI_ACTION_TALK => ['(%3$d)?Say:#target# says; (%7$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%8$s', 'Duration: %s'], + SAI_ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%7$d]:Reset faction of #target#;.', null], + SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%7$d)?Reset apperance.:Take the appearance of;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], + SAI_ACTION_SOUND => ['Play sound(%2$d)? to invoking player:;:[div float=right width=270px][sound=%1$d][/div]', 'Played by environment.'], + SAI_ACTION_PLAY_EMOTE => ['Emote [emote=%1$d] to #target#.', null], + SAI_ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', null], + SAI_ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', null], + SAI_ACTION_SET_REACT_STATE => ['#target# becomes %7$s.', null], + SAI_ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', null], +/* 10*/ SAI_ACTION_RANDOM_EMOTE => ['Emote %7$s to #target#.', null], + SAI_ACTION_CAST => ['Cast [spell=%1$d] at #target#.', null], + SAI_ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %7$d:;(%4$d)?, attacking invoker:;.', null], + SAI_ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %7$d%%.', null], + SAI_ACTION_THREAT_ALL_PCT => ['Modify the threat of all targets by %7$d%%.', null], + SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Exploration event of [quest=%1$d] is completed for #target#.', null], + SAI_ACTION_SET_EMOTE_STATE => ['Continuously emote [emote=%1$d] to #target#.', null], + SAI_ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], + SAI_ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], +/* 20*/ SAI_ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', null], + SAI_ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', null], + SAI_ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', null], + SAI_ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', null], + SAI_ACTION_EVADE => ['#target# enters Evade Mode.', null], + SAI_ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], + SAI_ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy objective of [quest=%1$d] for #target#.', null], + SAI_ACTION_COMBAT_STOP => ['End current combat.', null], + SAI_ACTION_REMOVEAURASFROMSPELL => ['Remove (%1$d)?all auras:auras of [spell=%1$d]; from #target#.', null], + SAI_ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.', '(%7$d)?Angle: %7$.2f°:;(%8$d)? Some form of Quest Credit is given:;'], +/* 30*/ SAI_ACTION_RANDOM_PHASE => ['Pick random Event Phase from %7$s.', null], + SAI_ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', null], + SAI_ACTION_RESET_GOBJECT => ['Reset #target#.', null], + SAI_ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to #target#.', null], + SAI_ACTION_SET_INST_DATA => ['Set Instance (%3$d)?Boss State:Data Field; #[b]]%1$d[/b] to [b]%2$d[/b].', null], + null, + SAI_ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d](%2$d)? with level [b]%2$d[/b]:;.', null], + SAI_ACTION_DIE => ['Die...   painfully.', null], + SAI_ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', null], + SAI_ACTION_CALL_FOR_HELP => ['Call for help.', 'Use default help emote'], +/* 40*/ SAI_ACTION_SET_SHEATH => ['Sheath %7$s weapons.', null], + SAI_ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %7$s:;(%2$d)? and then respawn after %8$s:;.', null], + SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become invincable below (%2$d)?%2$d%%:%1$d; HP.', null], + SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%7$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], + SAI_ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %7$s.', null], + SAI_ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', null], + null, + SAI_ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', null], + SAI_ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', null], + SAI_ACTION_ATTACK_START => ['Start attacking #target#.', null], +/* 50*/ SAI_ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for ?%7$d:; at #target#.', 'Despawn linked to summoner'], + SAI_ACTION_KILL_UNIT => ['#target# dies!', null], + SAI_ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%7$s[/span] to [span class=q1]%8$s[/span]', null], + SAI_ACTION_WP_START => ['(%1$d)?Walk:Run; on waypoint path #[b]%2$d[/b].(%4$d)? Is linked to [quest=%4$d].:; React %8$s while following the path.(%5$d)? Despawn after %7$s.:;', 'Repeatable'], + SAI_ACTION_WP_PAUSE => ['Pause waypoint path for %7$d.', null], + SAI_ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %7$s:;.(%8$d)? [quest=%2$d] fails.:;(%9$d)? [quest=%2$d] is completed.:;', null], + SAI_ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', null], + SAI_ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', null], + SAI_ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %7$s.', null], + SAI_ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', null], +/* 60*/ SAI_ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', null], + SAI_ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', null], + SAI_ACTION_TELEPORT => ['#target# is teleported to [zone=%7$d].', null], + SAI_ACTION_SET_COUNTER => ['(%3$d)?Reset:Increase; Counter #[b]%1$d[/b] of #target#(%3$d)?: by [b]%2$d[/b];.', null], + SAI_ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', null], + SAI_ACTION_WP_RESUME => ['Continue on waypoint path.', null], + SAI_ACTION_SET_ORIENTATION => ['Set orientation to (%7$s)?face %7$s:Home Position;.', null], + SAI_ACTION_CREATE_TIMED_EVENT => ['(%8$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%7$s)? after %7$s:;.', 'Repeat every %s'], + SAI_ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', null], + SAI_ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], +/* 70*/ SAI_ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %7$s.', null], + SAI_ACTION_EQUIP => ['(%8$d)?Unequip non-standard items:Equip %7$s;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not nessecarily have an item template'], + SAI_ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', null], + SAI_ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', null], + SAI_ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', null], + SAI_ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', null], + SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI-Events.', null], + SAI_ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI-Events.', null], + SAI_ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', null], + SAI_ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', null], +/* 80*/ SAI_ACTION_CALL_TIMED_ACTIONLIST => ['Call [html]Timed Actionlist #%1$d[/html]. Updates %7$s.', null], + SAI_ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %7$s.', null], + SAI_ACTION_ADD_NPC_FLAG => ['Add %7$s npc flags to #target#.', null], + SAI_ACTION_REMOVE_NPC_FLAG => ['Remove %7$s npc flags from #target#.', null], + SAI_ACTION_SIMPLE_TALK => ['#target# says (%7$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%7$s', null], + SAI_ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.', null], + SAI_ACTION_CROSS_CAST => ['%7$s casts [spell=%1$d] at #target#.', null], + SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: [html]%7$s[/html]', null], + SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: [html]%7$s[/html]', null], + SAI_ACTION_RANDOM_MOVE => ['Move #target# to a random point within %1$dm.', null], +/* 90*/ SAI_ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %7$s for #target#.', null], + SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %7$s for #target#.', null], + SAI_ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Instantly:Delayed;'], + SAI_ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', null], + SAI_ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %7$s on #target#.', null], + SAI_ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %7$s to #target#.', null], + SAI_ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %7$s from #target#.', null], + SAI_ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f, [i]v[/i][sub]xy[/sub]: %1$.2f [i]v[/i][sub]z[/sub]: %2$.2f[/b]', null], + SAI_ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', null], + SAI_ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %7$s.', null], +/*100*/ SAI_ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', null], + SAI_ACTION_SET_HOME_POS => ['Set Home Position to (%10$d)?current position.:fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b];', null], + SAI_ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', null], + SAI_ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', null], + SAI_ACTION_SET_GO_FLAG => ['Set GameObject Flag to %7$s on #target#.', null], + SAI_ACTION_ADD_GO_FLAG => ['Add GameObject Flag %7$s to #target#.', null], + SAI_ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %7$s from #target#.', null], + SAI_ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%7$s)?[span class=breadcrumb-arrow] [/span]%7$s:[span class=q0][/span];', null], + SAI_ACTION_SET_POWER => ['%7$s is set to [b]%2$d[/b] for #target#.', null], + SAI_ACTION_ADD_POWER => ['Add [b]%2$d[/b] %7$s to #target#.', null], +/*110*/ SAI_ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %7$s from #target#.', null], + SAI_ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', null], + SAI_ACTION_GAME_EVENT_START => ['Start [event=%1$d].', null], + SAI_ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %7$s.', null], + SAI_ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b]', null], + SAI_ACTION_RANDOM_SOUND => ['Play a random sound(%5$d)? to invoking player:;:[div float=right width=270px]%7$s[/div]', 'Played by environment.'], + SAI_ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %7$s.', null], + SAI_ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', null], + SAI_ACTION_GO_SET_GO_STATE => ['Set gameobject state to %7$s.'. null], + SAI_ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', null], +/*120*/ SAI_ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%7$s[/b] from #target#.', null], + SAI_ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', null], + SAI_ACTION_FLEE => ['#target# flees for assistance for %7$s.', null], + SAI_ACTION_ADD_THREAT => ['Modify threat level of #target# by %7$d points.', null], + SAI_ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %7$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not nessecarily have an item template'], + SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %7$s.', null], + SAI_ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', null], + SAI_ACTION_STOP_MOTION => ['(%1$d)?Remove motion type #[b]%1$d[/b] from #target#. :;(%2$d)?Stop moving.:;', null], + ), + 'targetUNK' => '[span class=q10]unknown target #[b class=q1]%d[/b][/span]', + 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%.2f[/td][/tr][tr][td]Y[/td][td=header]%.2f[/td][/tr][tr][td]Z[/td][td=header]%.2f[/td][/tr][tr][td]O[/td][td=header]%.2f[/td][/tr][/table]', + 'targets' => array( + null, + SAI_TARGET_SELF => 'self', + SAI_TARGET_VICTIM => 'current target', + SAI_TARGET_HOSTILE_SECOND_AGGRO => '2nd in threat list', + SAI_TARGET_HOSTILE_LAST_AGGRO => 'last in threat list', + SAI_TARGET_HOSTILE_RANDOM => 'random target', + SAI_TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank target', + SAI_TARGET_ACTION_INVOKER => 'Invoker', + SAI_TARGET_POSITION => 'world coordinates', + SAI_TARGET_CREATURE_RANGE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %4$sm', +/*10*/ SAI_TARGET_CREATURE_GUID => '(%4$d)?[npc=%4$d]:NPC; with GUID #%1$d', + SAI_TARGET_CREATURE_DISTANCE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %4$sm', + SAI_TARGET_STORED => 'previously stored targets', + SAI_TARGET_GAMEOBJECT_RANGE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %4$sm', + SAI_TARGET_GAMEOBJECT_GUID => '(%4$d)?[object=%4$d]:gameobject; with GUID #%1$d', + SAI_TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %4$sm', + SAI_TARGET_INVOKER_PARTY => 'Invokers party', + SAI_TARGET_PLAYER_RANGE => 'random player within %4$sm', + SAI_TARGET_PLAYER_DISTANCE => 'random player within %4$sm', + SAI_TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:arbitrary creature; within %4$sm', +/*20*/ SAI_TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:arbitrary gameobject; within %4$sm', + SAI_TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', + SAI_TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', + SAI_TARGET_OWNER_OR_SUMMONER => 'Invokers owner or summoner', + SAI_TARGET_THREAT_LIST => 'all units engaged in combat with self', + SAI_TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:enemy; within %1$dm', + SAI_TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:creature; within %1$dm', + SAI_TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', + SAI_TARGET_FARTHEST => 'furthest engaged (%2$d)?player:creature; within %1$dm(%3$d)? and line of sight:;', + SAI_TARGET_VEHICLE_ACCESSORY => 'accessory in Invokers vehicle in seat %1$d' + ), + 'castFlags' => array( + SAI_CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', + SAI_CAST_FLAG_TRIGGERED => 'Triggered', + SAI_CAST_FLAG_AURA_MISSING => 'Aura missing', + SAI_CAST_FLAG_COMBAT_MOVE => 'Combat movement' + ), + 'GOStates' => ['active', 'ready', 'active alternative'], + 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], + 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], + 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], + 'sheaths' => ['all', 'melee', 'ranged'], + 'saiUpdate' => ['out of combat', 'in combat', 'always'], + 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], + + 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', + 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', + 'aiTplUNK' => '[span class=q10]unknown AI-Template #[b class=q1]%d[/b][/span]', + 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', + 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', + 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', + 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', + + 'empty' => '[span class=q0][/span]' ), 'account' => array( 'title' => "Compte Aowow", @@ -461,7 +827,17 @@ $lang = array( 'triggeredBy' => "Déclenché par", 'capturePoint' => "Point de capture", 'foundIn' => "Cette entité se trouve dans", - 'restock' => "Se remplit toutes les %s.]" + 'restock' => "Se remplit toutes les %s.", + 'goFlags' => array( + GO_FLAG_IN_USE => 'In use', + GO_FLAG_LOCKED => 'Locked', + GO_FLAG_INTERACT_COND => 'Cannot interact', + GO_FLAG_TRANSPORT => 'Transport', + GO_FLAG_NOT_SELECTABLE => 'Not selectable', + GO_FLAG_TRIGGERED => 'Triggered', + GO_FLAG_DAMAGED => 'Siege damaged', + GO_FLAG_DESTROYED => 'Siege destroyed' + ) ), 'npc' => array( 'notFound' => "Ce PNJ n'existe pas.", @@ -498,6 +874,32 @@ $lang = array( 'cat' => array( "Non classés", "Bêtes", "Draconien", "Démons", "Élémentaires", "Géants", "Mort-vivant", "Humanoïdes", "Bestioles", "Mécaniques", "Non spécifié", "Totems", "Familier pacifique", "Nuages de gaz" + ), + 'npcFlags' => array( + NPC_FLAG_GOSSIP => 'Gossip', + NPC_FLAG_QUEST_GIVER => 'Quest Giver', + NPC_FLAG_TRAINER => 'Trainer', + NPC_FLAG_CLASS_TRAINER => 'Class Trainer', + NPC_PROFESSION_TRAINER => 'Profession Trainer', + NPC_FLAG_VENDOR => 'Vendor', + NPC_FLAG_VENDOR_AMMO => 'Ammo Vendor', + NPC_FLAG_VENDOR_FOOD => 'Food Vendor', + NPC_FLAG_VENDOR_POISON => 'Poison Vendor', + NPC_FLAG_VENDOR_REAGENT => 'Reagent Vendor', + NPC_FLAG_REPAIRER => 'Repair', + NPC_FLAG_FLIGHT_MASTER => 'Flight Master', + NPC_FLAG_SPIRIT_HEALER => 'Spirit Healer', + NPC_FLAG_SPIRIT_GUIDE => 'Spirit Guide', + NPC_FLAG_INNKEEPER => 'Innkeeper', + NPC_FLAG_BANKER => 'Banker', + NPC_FLAG_PETITIONER => 'Petitioner', + NPC_FLAG_GUILD_MASTER => 'Guild Master', + NPC_FLAG_BATTLEMASTER => 'Battle Master', + NPC_FLAG_AUCTIONEER => 'Auctioneer', + NPC_FLAG_STABLE_MASTER => 'Stable Master', + NPC_FLAG_GUILD_BANK => 'Guild Bank', + NPC_FLAG_SPELLCLICK => 'Spellclick', + NPC_FLAG_MAILBOX => 'Mailbox' ) ), 'event' => array( @@ -710,7 +1112,6 @@ $lang = array( -22 => "Saisonnier", -41 => "REUSE - vieil Uldaman", -364 => "Foire de Sombrelune", -366 => "Fête lunaire", -369 => "Solstice d'été", -370 => "Fête des Brasseurs", -374 => "Jardin des nobles", -375 => "Bienfaits du pèlerin", -376 => "De l'amour dans l'air", -1001 => "Voile d'hiver", -1002 => "Semaine des enfants", -1003 => "Sanssaint", -1005 => "Fête des moissons" - ), 10 => array( "Norfendre", 65 => "Désolation des dragons", 66 => "Zul'Drak", 67 => "Les pics Foudroyés", 210 => "La Couronne de glace", 394 => "Les Grisonnes", diff --git a/localization/locale_ruru.php b/localization/locale_ruru.php index aae5f526..3da13ba9 100644 --- a/localization/locale_ruru.php +++ b/localization/locale_ruru.php @@ -336,6 +336,372 @@ $lang = array( "Knight-Champion / Centurion", "Lieutenant Commander / Champion", "Commander / Lieutenant General", "Marshal / General", "Field Marshal / Warlord", "Grand Marshal / High Warlord" ), + 'orientation' => ['North', 'Northeast', 'East', 'Southeast', 'South', 'Southwest', 'West', 'Northwest'] + ), + 'unit' => array( + 'flags' => array( + UNIT_FLAG_SERVER_CONTROLLED => 'Server controlled', + UNIT_FLAG_NON_ATTACKABLE => 'Not attackable', + UNIT_FLAG_REMOVE_CLIENT_CONTROL => 'Remove client control', + UNIT_FLAG_PVP_ATTACKABLE => 'PvP attackable', + UNIT_FLAG_RENAME => 'Rename', + UNIT_FLAG_PREPARATION => 'Arena preparation', + UNIT_FLAG_UNK_6 => 'UNK-6', + UNIT_FLAG_NOT_ATTACKABLE_1 => 'Not Attackable', + UNIT_FLAG_IMMUNE_TO_PC => 'Immune to players', + UNIT_FLAG_IMMUNE_TO_NPC => 'Immune to creatures', + UNIT_FLAG_LOOTING => 'Loot animation', + UNIT_FLAG_PET_IN_COMBAT => 'Pet in combat', + UNIT_FLAG_PVP => 'PvP', + UNIT_FLAG_SILENCED => 'Silenced', + UNIT_FLAG_CANNOT_SWIM => 'Cannot swim', + UNIT_FLAG_UNK_15 => 'UNK-15 (can only swim)', + UNIT_FLAG_UNK_16 => 'UNK-16 (cannot attack)', + UNIT_FLAG_PACIFIED => 'Pacified', + UNIT_FLAG_STUNNED => 'Stunned', + UNIT_FLAG_IN_COMBAT => 'In combat', + UNIT_FLAG_TAXI_FLIGHT => 'Taxi flight', + UNIT_FLAG_DISARMED => 'Disarmed', + UNIT_FLAG_CONFUSED => 'Confused', + UNIT_FLAG_FLEEING => 'Fleeing', + UNIT_FLAG_PLAYER_CONTROLLED => 'Player controlled', + UNIT_FLAG_NOT_SELECTABLE => 'Not selectable', + UNIT_FLAG_SKINNABLE => 'Skinnable', + UNIT_FLAG_MOUNT => 'Mounted', + UNIT_FLAG_UNK_28 => 'UNK-28', + UNIT_FLAG_UNK_29 => 'UNK-29 (Prevent emotes)', + UNIT_FLAG_SHEATHE => 'Sheathe weapon', + UNIT_FLAG_UNK_31 => 'UNK-31' + ), + 'flags2' => array( + UNIT_FLAG2_FEIGN_DEATH => 'Feign Death', + UNIT_FLAG2_UNK1 => 'UNK-1 (hide unit model)', + UNIT_FLAG2_IGNORE_REPUTATION => 'Ignore reputation', + UNIT_FLAG2_COMPREHEND_LANG => 'Comprehend language', + UNIT_FLAG2_MIRROR_IMAGE => 'Mirror Image', + UNIT_FLAG2_INSTANTLY_APPEAR_MODEL => 'Instant spawn', + UNIT_FLAG2_FORCE_MOVEMENT => 'Force movement', + UNIT_FLAG2_DISARM_OFFHAND => 'Disarm offhand weapon', + UNIT_FLAG2_DISABLE_PRED_STATS => 'Disable predicted stats', + UNIT_FLAG2_DISARM_RANGED => 'Disarm ranged weapon', + UNIT_FLAG2_REGENERATE_POWER => 'Regenerate power', + UNIT_FLAG2_RESTRICT_PARTY_INTERACTION => 'Restrict party interaction', + UNIT_FLAG2_PREVENT_SPELL_CLICK => 'Prevent spell click', + UNIT_FLAG2_ALLOW_ENEMY_INTERACT => 'Allow enemy interaction', + UNIT_FLAG2_DISABLE_TURN => 'Disable turn', + UNIT_FLAG2_UNK2 => 'UNK-2', + UNIT_FLAG2_PLAY_DEATH_ANIM => 'Play special death animation', + UNIT_FLAG2_ALLOW_CHEAT_SPELLS => 'allow cheat spells' + ), + 'dynFlags' => array( + UNIT_DYNFLAG_LOOTABLE => 'Lootable', + UNIT_DYNFLAG_TRACK_UNIT => 'Tracked', + UNIT_DYNFLAG_TAPPED => 'Tapped', + UNIT_DYNFLAG_TAPPED_BY_PLAYER => 'Tapped by player', + UNIT_DYNFLAG_SPECIALINFO => 'Special info', + UNIT_DYNFLAG_DEAD => 'Dead', + UNIT_DYNFLAG_REFER_A_FRIEND => 'Refer-a-friend', + UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST => 'Tapped by all threat list' + ), + 'bytes1' => array( +/*idx:0*/ ['Standing', 'Sitting on ground', 'Sitting on chair', 'Sleeping', 'Sitting on low chair', 'Sitting on medium chair', 'Sitting on high chair', 'Dead', 'Kneeing', 'Submerged'], // STAND_STATE_* + null, +/*idx:2*/ array( + UNIT_STAND_FLAGS_UNK1 => 'UNK-1', + UNIT_STAND_FLAGS_CREEP => 'Creep', + UNIT_STAND_FLAGS_UNTRACKABLE => 'Untrackable', + UNIT_STAND_FLAGS_UNK4 => 'UNK-4', + UNIT_STAND_FLAGS_UNK5 => 'UNK-5' + ), +/*idx:3*/ array( + UNIT_BYTE1_FLAG_ALWAYS_STAND => 'Always standing', + UNIT_BYTE1_FLAG_HOVER => 'Hovering', + UNIT_BYTE1_FLAG_UNK_3 => 'UNK-3' + ), + 'valueUNK' => '[span class=q10]unhandled value [b class=q1]%d[/b] provided for UnitFieldBytes1 on offset [b class=q1]%d[/b][/span]', + 'idxUNK' => '[span class=q10]unused offset [b class=q1]%d[/b] provided for UnitFieldBytes1[/span]' + ) + ), + 'smartAI' => array( + 'eventUNK' => '[span class=q10]Unknwon event #[b class=q1]%d[/b] in use.[/span]', + 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', + 'events' => array( + SAI_EVENT_UPDATE_IC => ['(%7$d)?:When in combat, ;(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_UPDATE_OOC => ['(%7$d)?:When out of combat, ;(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_HEALT_PCT => ['At %6$s%% Health', 'Repeat every %s'], + SAI_EVENT_MANA_PCT => ['At %6$s%% Mana', 'Repeat every %s'], + SAI_EVENT_AGGRO => ['On Aggro', null], + SAI_EVENT_KILL => ['On killing (%3$d)?player:;(%4$d)?[npc=%4$d]:any creature;', 'Cooldown: %s'], + SAI_EVENT_DEATH => ['On death', null], + SAI_EVENT_EVADE => ['When evading', null], + SAI_EVENT_SPELLHIT => ['When hit by (%6$s)?%6$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SAI_EVENT_RANGE => ['On target at %6$sm', 'Repeat every %s'], +/* 10*/ SAI_EVENT_OOC_LOS => ['While out of combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SAI_EVENT_RESPAWN => ['On respawn', null], + SAI_EVENT_TARGET_HEALTH_PCT => ['On target at %6$s%% health', 'Repeat every %s'], + SAI_EVENT_VICTIM_CASTING => ['Current target is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], + SAI_EVENT_TARGET_MANA_PCT => ['On target at %6$s%% mana', 'Repeat every %s'], + SAI_EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', null], +/* 20*/ SAI_EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', null], + SAI_EVENT_REACHED_HOME => ['Arriving at home coordinates', null], + SAI_EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], + SAI_EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_RESET => ['On reset', null], + SAI_EVENT_IC_LOS => ['While in combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SAI_EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], + SAI_EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], + SAI_EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', null], +/* 30*/ SAI_EVENT_CHARMED_TARGET => ['When charming #target#', null], + SAI_EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%6$s)?%6$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SAI_EVENT_DAMAGED => ['After taking %6$s points of damage', 'Repeat every %s'], + SAI_EVENT_DAMAGED_TARGET => ['After #target# took %6$s points of damage', 'Repeat every %s'], + SAI_EVENT_MOVEMENTINFORM => ['Started moving to point #[b]%2$d[/b](%1$d)? using MotionType #[b]%1$d[/b]:;', null], + SAI_EVENT_SUMMON_DESPAWNED => ['Summoned [npc=%1$d] despawned', 'Cooldown: %s'], + SAI_EVENT_CORPSE_REMOVED => ['On corpse despawn', null], + SAI_EVENT_AI_INIT => ['AI initialized', null], + SAI_EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], + SAI_EVENT_WAYPOINT_START => ['Start pathing on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], +/* 40*/ SAI_EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + null, + null, + null, + null, + null, + SAI_EVENT_AREATRIGGER_ONTRIGGER => ['On activation', null], + null, + null, + null, +/* 50*/ null, + null, + SAI_EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', null], + SAI_EVENT_RECEIVE_HEAL => ['Received %6$s points of healing', 'Cooldown: %s'], + SAI_EVENT_JUST_SUMMONED => ['On being summoned', null], + SAI_EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', null], +/* 60*/ SAI_EVENT_UPDATE => ['(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_LINK => ['After Event %6$s', null], + SAI_EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%6$s)?[span class=q1]%6$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', null], + SAI_EVENT_JUST_CREATED => ['On being spawned for the first time', null], + SAI_EVENT_GOSSIP_HELLO => ['Opening Gossip', null], + SAI_EVENT_FOLLOW_COMPLETED => ['Finished following', null], + SAI_EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %6$s', null], + SAI_EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], + SAI_EVENT_GAME_EVENT_START => ['[event=%1$d] started', null], + SAI_EVENT_GAME_EVENT_END => ['[event=%1$d] ended', null], +/* 70*/ SAI_EVENT_GO_STATE_CHANGED => ['State has changed', null], + SAI_EVENT_GO_EVENT_INFORM => ['Taxi path event #[b]%1$d[/b] trigered', null], + SAI_EVENT_ACTION_DONE => ['Executed action #[b]%1$d[/b] requested by script', null], + SAI_EVENT_ON_SPELLCLICK => ['Spellclick triggered', null], + SAI_EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %6$s%%', 'Repeat every %s'], + SAI_EVENT_DISTANCE_CREATURE => ['[npc=%6$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], + SAI_EVENT_DISTANCE_GAMEOBJECT => ['[object=%6$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], + SAI_EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', null], + ), + 'eventFlags' => array( + SAI_EVENT_FLAG_NO_REPEAT => 'No Repeat', + SAI_EVENT_FLAG_DIFFICULTY_0 => 'Normal Dungeon', + SAI_EVENT_FLAG_DIFFICULTY_1 => 'Heroic Dungeon', + SAI_EVENT_FLAG_DIFFICULTY_2 => 'Normal Raid', + SAI_EVENT_FLAG_DIFFICULTY_3 => 'Heroic Raid', + SAI_EVENT_FLAG_NO_RESET => 'No Reset', + SAI_EVENT_FLAG_WHILE_CHARMED => 'While Charmed' + ), + 'actionUNK' => '[span class=q10]Unknown action #[b class=q1]%d[/b] in use.[/span]', + 'actionTT' => '[b class=q1]ActionType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][tr][td]Param6[/td][td=header]%d[/td][/tr][/table]', + 'actions' => array( // [body, footer] + null, + SAI_ACTION_TALK => ['(%3$d)?Say:#target# says; (%7$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%8$s', 'Duration: %s'], + SAI_ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%7$d]:Reset faction of #target#;.', null], + SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%7$d)?Reset apperance.:Take the appearance of;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], + SAI_ACTION_SOUND => ['Play sound(%2$d)? to invoking player:;:[div float=right width=270px][sound=%1$d][/div]', 'Played by environment.'], + SAI_ACTION_PLAY_EMOTE => ['Emote [emote=%1$d] to #target#.', null], + SAI_ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', null], + SAI_ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', null], + SAI_ACTION_SET_REACT_STATE => ['#target# becomes %7$s.', null], + SAI_ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', null], +/* 10*/ SAI_ACTION_RANDOM_EMOTE => ['Emote %7$s to #target#.', null], + SAI_ACTION_CAST => ['Cast [spell=%1$d] at #target#.', null], + SAI_ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %7$d:;(%4$d)?, attacking invoker:;.', null], + SAI_ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %7$d%%.', null], + SAI_ACTION_THREAT_ALL_PCT => ['Modify the threat of all targets by %7$d%%.', null], + SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Exploration event of [quest=%1$d] is completed for #target#.', null], + SAI_ACTION_SET_EMOTE_STATE => ['Continuously emote [emote=%1$d] to #target#.', null], + SAI_ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], + SAI_ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], +/* 20*/ SAI_ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', null], + SAI_ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', null], + SAI_ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', null], + SAI_ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', null], + SAI_ACTION_EVADE => ['#target# enters Evade Mode.', null], + SAI_ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], + SAI_ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy objective of [quest=%1$d] for #target#.', null], + SAI_ACTION_COMBAT_STOP => ['End current combat.', null], + SAI_ACTION_REMOVEAURASFROMSPELL => ['Remove (%1$d)?all auras:auras of [spell=%1$d]; from #target#.', null], + SAI_ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.', '(%7$d)?Angle: %7$.2f°:;(%8$d)? Some form of Quest Credit is given:;'], +/* 30*/ SAI_ACTION_RANDOM_PHASE => ['Pick random Event Phase from %7$s.', null], + SAI_ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', null], + SAI_ACTION_RESET_GOBJECT => ['Reset #target#.', null], + SAI_ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to #target#.', null], + SAI_ACTION_SET_INST_DATA => ['Set Instance (%3$d)?Boss State:Data Field; #[b]]%1$d[/b] to [b]%2$d[/b].', null], + null, + SAI_ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d](%2$d)? with level [b]%2$d[/b]:;.', null], + SAI_ACTION_DIE => ['Die...   painfully.', null], + SAI_ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', null], + SAI_ACTION_CALL_FOR_HELP => ['Call for help.', 'Use default help emote'], +/* 40*/ SAI_ACTION_SET_SHEATH => ['Sheath %7$s weapons.', null], + SAI_ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %7$s:;(%2$d)? and then respawn after %8$s:;.', null], + SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become invincable below (%2$d)?%2$d%%:%1$d; HP.', null], + SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%7$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], + SAI_ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %7$s.', null], + SAI_ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', null], + null, + SAI_ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', null], + SAI_ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', null], + SAI_ACTION_ATTACK_START => ['Start attacking #target#.', null], +/* 50*/ SAI_ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for ?%7$d:; at #target#.', 'Despawn linked to summoner'], + SAI_ACTION_KILL_UNIT => ['#target# dies!', null], + SAI_ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%7$s[/span] to [span class=q1]%8$s[/span]', null], + SAI_ACTION_WP_START => ['(%1$d)?Walk:Run; on waypoint path #[b]%2$d[/b].(%4$d)? Is linked to [quest=%4$d].:; React %8$s while following the path.(%5$d)? Despawn after %7$s.:;', 'Repeatable'], + SAI_ACTION_WP_PAUSE => ['Pause waypoint path for %7$d.', null], + SAI_ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %7$s:;.(%8$d)? [quest=%2$d] fails.:;(%9$d)? [quest=%2$d] is completed.:;', null], + SAI_ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', null], + SAI_ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', null], + SAI_ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %7$s.', null], + SAI_ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', null], +/* 60*/ SAI_ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', null], + SAI_ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', null], + SAI_ACTION_TELEPORT => ['#target# is teleported to [zone=%7$d].', null], + SAI_ACTION_SET_COUNTER => ['(%3$d)?Reset:Increase; Counter #[b]%1$d[/b] of #target#(%3$d)?: by [b]%2$d[/b];.', null], + SAI_ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', null], + SAI_ACTION_WP_RESUME => ['Continue on waypoint path.', null], + SAI_ACTION_SET_ORIENTATION => ['Set orientation to (%7$s)?face %7$s:Home Position;.', null], + SAI_ACTION_CREATE_TIMED_EVENT => ['(%8$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%7$s)? after %7$s:;.', 'Repeat every %s'], + SAI_ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', null], + SAI_ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], +/* 70*/ SAI_ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %7$s.', null], + SAI_ACTION_EQUIP => ['(%8$d)?Unequip non-standard items:Equip %7$s;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not nessecarily have an item template'], + SAI_ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', null], + SAI_ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', null], + SAI_ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', null], + SAI_ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', null], + SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI-Events.', null], + SAI_ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI-Events.', null], + SAI_ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', null], + SAI_ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', null], +/* 80*/ SAI_ACTION_CALL_TIMED_ACTIONLIST => ['Call [html]Timed Actionlist #%1$d[/html]. Updates %7$s.', null], + SAI_ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %7$s.', null], + SAI_ACTION_ADD_NPC_FLAG => ['Add %7$s npc flags to #target#.', null], + SAI_ACTION_REMOVE_NPC_FLAG => ['Remove %7$s npc flags from #target#.', null], + SAI_ACTION_SIMPLE_TALK => ['#target# says (%7$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%7$s', null], + SAI_ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.', null], + SAI_ACTION_CROSS_CAST => ['%7$s casts [spell=%1$d] at #target#.', null], + SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: [html]%7$s[/html]', null], + SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: [html]%7$s[/html]', null], + SAI_ACTION_RANDOM_MOVE => ['Move #target# to a random point within %1$dm.', null], +/* 90*/ SAI_ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %7$s for #target#.', null], + SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %7$s for #target#.', null], + SAI_ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Instantly:Delayed;'], + SAI_ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', null], + SAI_ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %7$s on #target#.', null], + SAI_ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %7$s to #target#.', null], + SAI_ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %7$s from #target#.', null], + SAI_ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f, [i]v[/i][sub]xy[/sub]: %1$.2f [i]v[/i][sub]z[/sub]: %2$.2f[/b]', null], + SAI_ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', null], + SAI_ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %7$s.', null], +/*100*/ SAI_ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', null], + SAI_ACTION_SET_HOME_POS => ['Set Home Position to (%10$d)?current position.:fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b];', null], + SAI_ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', null], + SAI_ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', null], + SAI_ACTION_SET_GO_FLAG => ['Set GameObject Flag to %7$s on #target#.', null], + SAI_ACTION_ADD_GO_FLAG => ['Add GameObject Flag %7$s to #target#.', null], + SAI_ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %7$s from #target#.', null], + SAI_ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%7$s)?[span class=breadcrumb-arrow] [/span]%7$s:[span class=q0][/span];', null], + SAI_ACTION_SET_POWER => ['%7$s is set to [b]%2$d[/b] for #target#.', null], + SAI_ACTION_ADD_POWER => ['Add [b]%2$d[/b] %7$s to #target#.', null], +/*110*/ SAI_ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %7$s from #target#.', null], + SAI_ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', null], + SAI_ACTION_GAME_EVENT_START => ['Start [event=%1$d].', null], + SAI_ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %7$s.', null], + SAI_ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b]', null], + SAI_ACTION_RANDOM_SOUND => ['Play a random sound(%5$d)? to invoking player:;:[div float=right width=270px]%7$s[/div]', 'Played by environment.'], + SAI_ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %7$s.', null], + SAI_ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', null], + SAI_ACTION_GO_SET_GO_STATE => ['Set gameobject state to %7$s.'. null], + SAI_ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', null], +/*120*/ SAI_ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%7$s[/b] from #target#.', null], + SAI_ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', null], + SAI_ACTION_FLEE => ['#target# flees for assistance for %7$s.', null], + SAI_ACTION_ADD_THREAT => ['Modify threat level of #target# by %7$d points.', null], + SAI_ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %7$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not nessecarily have an item template'], + SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %7$s.', null], + SAI_ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', null], + SAI_ACTION_STOP_MOTION => ['(%1$d)?Remove motion type #[b]%1$d[/b] from #target#. :;(%2$d)?Stop moving.:;', null], + ), + 'targetUNK' => '[span class=q10]unknown target #[b class=q1]%d[/b][/span]', + 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%.2f[/td][/tr][tr][td]Y[/td][td=header]%.2f[/td][/tr][tr][td]Z[/td][td=header]%.2f[/td][/tr][tr][td]O[/td][td=header]%.2f[/td][/tr][/table]', + 'targets' => array( + null, + SAI_TARGET_SELF => 'self', + SAI_TARGET_VICTIM => 'current target', + SAI_TARGET_HOSTILE_SECOND_AGGRO => '2nd in threat list', + SAI_TARGET_HOSTILE_LAST_AGGRO => 'last in threat list', + SAI_TARGET_HOSTILE_RANDOM => 'random target', + SAI_TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank target', + SAI_TARGET_ACTION_INVOKER => 'Invoker', + SAI_TARGET_POSITION => 'world coordinates', + SAI_TARGET_CREATURE_RANGE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %4$sm', +/*10*/ SAI_TARGET_CREATURE_GUID => '(%4$d)?[npc=%4$d]:NPC; with GUID #%1$d', + SAI_TARGET_CREATURE_DISTANCE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %4$sm', + SAI_TARGET_STORED => 'previously stored targets', + SAI_TARGET_GAMEOBJECT_RANGE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %4$sm', + SAI_TARGET_GAMEOBJECT_GUID => '(%4$d)?[object=%4$d]:gameobject; with GUID #%1$d', + SAI_TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %4$sm', + SAI_TARGET_INVOKER_PARTY => 'Invokers party', + SAI_TARGET_PLAYER_RANGE => 'random player within %4$sm', + SAI_TARGET_PLAYER_DISTANCE => 'random player within %4$sm', + SAI_TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:arbitrary creature; within %4$sm', +/*20*/ SAI_TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:arbitrary gameobject; within %4$sm', + SAI_TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', + SAI_TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', + SAI_TARGET_OWNER_OR_SUMMONER => 'Invokers owner or summoner', + SAI_TARGET_THREAT_LIST => 'all units engaged in combat with self', + SAI_TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:enemy; within %1$dm', + SAI_TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:creature; within %1$dm', + SAI_TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', + SAI_TARGET_FARTHEST => 'furthest engaged (%2$d)?player:creature; within %1$dm(%3$d)? and line of sight:;', + SAI_TARGET_VEHICLE_ACCESSORY => 'accessory in Invokers vehicle in seat %1$d' + ), + 'castFlags' => array( + SAI_CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', + SAI_CAST_FLAG_TRIGGERED => 'Triggered', + SAI_CAST_FLAG_AURA_MISSING => 'Aura missing', + SAI_CAST_FLAG_COMBAT_MOVE => 'Combat movement' + ), + 'GOStates' => ['active', 'ready', 'active alternative'], + 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], + 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], + 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], + 'sheaths' => ['all', 'melee', 'ranged'], + 'saiUpdate' => ['out of combat', 'in combat', 'always'], + 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], + + 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', + 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', + 'aiTplUNK' => '[span class=q10]unknown AI-Template #[b class=q1]%d[/b][/span]', + 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', + 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', + 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', + 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', + + 'empty' => '[span class=q0][/span]' ), 'account' => array( 'title' => "Учетная запись Aowow", @@ -461,7 +827,17 @@ $lang = array( 'triggeredBy' => "Срабатывает от", 'capturePoint' => "Точка захвата", 'foundIn' => "Этот НИП может быть найден в следующих зонах:", - 'restock' => "[Restocks every %s.]" + 'restock' => "[Restocks every %s.]", + 'goFlags' => array( + GO_FLAG_IN_USE => 'In use', + GO_FLAG_LOCKED => 'Locked', + GO_FLAG_INTERACT_COND => 'Cannot interact', + GO_FLAG_TRANSPORT => 'Transport', + GO_FLAG_NOT_SELECTABLE => 'Not selectable', + GO_FLAG_TRIGGERED => 'Triggered', + GO_FLAG_DAMAGED => 'Siege damaged', + GO_FLAG_DESTROYED => 'Siege destroyed' + ) ), 'npc' => array( 'notFound' => "Такой НИП не существует.", @@ -498,6 +874,32 @@ $lang = array( 'cat' => array( "Разное", "Животные", "Дракон", "Демоны", "Элементали", "Великаны", "Нежить", "Гуманоиды", "Существа", "Механизмы", "Не указано", "Тотемы", "Спутники", "Облака газа" + ), + 'npcFlags' => array( + NPC_FLAG_GOSSIP => 'Gossip', + NPC_FLAG_QUEST_GIVER => 'Quest Giver', + NPC_FLAG_TRAINER => 'Trainer', + NPC_FLAG_CLASS_TRAINER => 'Class Trainer', + NPC_PROFESSION_TRAINER => 'Profession Trainer', + NPC_FLAG_VENDOR => 'Vendor', + NPC_FLAG_VENDOR_AMMO => 'Ammo Vendor', + NPC_FLAG_VENDOR_FOOD => 'Food Vendor', + NPC_FLAG_VENDOR_POISON => 'Poison Vendor', + NPC_FLAG_VENDOR_REAGENT => 'Reagent Vendor', + NPC_FLAG_REPAIRER => 'Repair', + NPC_FLAG_FLIGHT_MASTER => 'Flight Master', + NPC_FLAG_SPIRIT_HEALER => 'Spirit Healer', + NPC_FLAG_SPIRIT_GUIDE => 'Spirit Guide', + NPC_FLAG_INNKEEPER => 'Innkeeper', + NPC_FLAG_BANKER => 'Banker', + NPC_FLAG_PETITIONER => 'Petitioner', + NPC_FLAG_GUILD_MASTER => 'Guild Master', + NPC_FLAG_BATTLEMASTER => 'Battle Master', + NPC_FLAG_AUCTIONEER => 'Auctioneer', + NPC_FLAG_STABLE_MASTER => 'Stable Master', + NPC_FLAG_GUILD_BANK => 'Guild Bank', + NPC_FLAG_SPELLCLICK => 'Spellclick', + NPC_FLAG_MAILBOX => 'Mailbox' ) ), 'event' => array( diff --git a/localization/locale_zhcn.php b/localization/locale_zhcn.php index 6898c754..0bf1858f 100644 --- a/localization/locale_zhcn.php +++ b/localization/locale_zhcn.php @@ -32,7 +32,6 @@ $lang = array( 'sex' => [null, "男性", "女性"], 'players' => "玩家", 'quickFacts' => "相关信息", - 'screenshots' => "截图", 'screenshots' => "屏幕截图", 'videos' => "视频", 'side' => "阵营", @@ -337,6 +336,372 @@ $lang = array( "护卫骑士 / 百夫长", "少校 / 勇士", "司令 / 中将", "统帅 / 将军", "元帅 / 督军", "大元帅 / 高阶督军" ), + 'orientation' => ['North', 'Northeast', 'East', 'Southeast', 'South', 'Southwest', 'West', 'Northwest'] + ), + 'unit' => array( + 'flags' => array( + UNIT_FLAG_SERVER_CONTROLLED => 'Server controlled', + UNIT_FLAG_NON_ATTACKABLE => 'Not attackable', + UNIT_FLAG_REMOVE_CLIENT_CONTROL => 'Remove client control', + UNIT_FLAG_PVP_ATTACKABLE => 'PvP attackable', + UNIT_FLAG_RENAME => 'Rename', + UNIT_FLAG_PREPARATION => 'Arena preparation', + UNIT_FLAG_UNK_6 => 'UNK-6', + UNIT_FLAG_NOT_ATTACKABLE_1 => 'Not Attackable', + UNIT_FLAG_IMMUNE_TO_PC => 'Immune to players', + UNIT_FLAG_IMMUNE_TO_NPC => 'Immune to creatures', + UNIT_FLAG_LOOTING => 'Loot animation', + UNIT_FLAG_PET_IN_COMBAT => 'Pet in combat', + UNIT_FLAG_PVP => 'PvP', + UNIT_FLAG_SILENCED => 'Silenced', + UNIT_FLAG_CANNOT_SWIM => 'Cannot swim', + UNIT_FLAG_UNK_15 => 'UNK-15 (can only swim)', + UNIT_FLAG_UNK_16 => 'UNK-16 (cannot attack)', + UNIT_FLAG_PACIFIED => 'Pacified', + UNIT_FLAG_STUNNED => 'Stunned', + UNIT_FLAG_IN_COMBAT => 'In combat', + UNIT_FLAG_TAXI_FLIGHT => 'Taxi flight', + UNIT_FLAG_DISARMED => 'Disarmed', + UNIT_FLAG_CONFUSED => 'Confused', + UNIT_FLAG_FLEEING => 'Fleeing', + UNIT_FLAG_PLAYER_CONTROLLED => 'Player controlled', + UNIT_FLAG_NOT_SELECTABLE => 'Not selectable', + UNIT_FLAG_SKINNABLE => 'Skinnable', + UNIT_FLAG_MOUNT => 'Mounted', + UNIT_FLAG_UNK_28 => 'UNK-28', + UNIT_FLAG_UNK_29 => 'UNK-29 (Prevent emotes)', + UNIT_FLAG_SHEATHE => 'Sheathe weapon', + UNIT_FLAG_UNK_31 => 'UNK-31' + ), + 'flags2' => array( + UNIT_FLAG2_FEIGN_DEATH => 'Feign Death', + UNIT_FLAG2_UNK1 => 'UNK-1 (hide unit model)', + UNIT_FLAG2_IGNORE_REPUTATION => 'Ignore reputation', + UNIT_FLAG2_COMPREHEND_LANG => 'Comprehend language', + UNIT_FLAG2_MIRROR_IMAGE => 'Mirror Image', + UNIT_FLAG2_INSTANTLY_APPEAR_MODEL => 'Instant spawn', + UNIT_FLAG2_FORCE_MOVEMENT => 'Force movement', + UNIT_FLAG2_DISARM_OFFHAND => 'Disarm offhand weapon', + UNIT_FLAG2_DISABLE_PRED_STATS => 'Disable predicted stats', + UNIT_FLAG2_DISARM_RANGED => 'Disarm ranged weapon', + UNIT_FLAG2_REGENERATE_POWER => 'Regenerate power', + UNIT_FLAG2_RESTRICT_PARTY_INTERACTION => 'Restrict party interaction', + UNIT_FLAG2_PREVENT_SPELL_CLICK => 'Prevent spell click', + UNIT_FLAG2_ALLOW_ENEMY_INTERACT => 'Allow enemy interaction', + UNIT_FLAG2_DISABLE_TURN => 'Disable turn', + UNIT_FLAG2_UNK2 => 'UNK-2', + UNIT_FLAG2_PLAY_DEATH_ANIM => 'Play special death animation', + UNIT_FLAG2_ALLOW_CHEAT_SPELLS => 'allow cheat spells' + ), + 'dynFlags' => array( + UNIT_DYNFLAG_LOOTABLE => 'Lootable', + UNIT_DYNFLAG_TRACK_UNIT => 'Tracked', + UNIT_DYNFLAG_TAPPED => 'Tapped', + UNIT_DYNFLAG_TAPPED_BY_PLAYER => 'Tapped by player', + UNIT_DYNFLAG_SPECIALINFO => 'Special info', + UNIT_DYNFLAG_DEAD => 'Dead', + UNIT_DYNFLAG_REFER_A_FRIEND => 'Refer-a-friend', + UNIT_DYNFLAG_TAPPED_BY_ALL_THREAT_LIST => 'Tapped by all threat list' + ), + 'bytes1' => array( +/*idx:0*/ ['Standing', 'Sitting on ground', 'Sitting on chair', 'Sleeping', 'Sitting on low chair', 'Sitting on medium chair', 'Sitting on high chair', 'Dead', 'Kneeing', 'Submerged'], // STAND_STATE_* + null, +/*idx:2*/ array( + UNIT_STAND_FLAGS_UNK1 => 'UNK-1', + UNIT_STAND_FLAGS_CREEP => 'Creep', + UNIT_STAND_FLAGS_UNTRACKABLE => 'Untrackable', + UNIT_STAND_FLAGS_UNK4 => 'UNK-4', + UNIT_STAND_FLAGS_UNK5 => 'UNK-5' + ), +/*idx:3*/ array( + UNIT_BYTE1_FLAG_ALWAYS_STAND => 'Always standing', + UNIT_BYTE1_FLAG_HOVER => 'Hovering', + UNIT_BYTE1_FLAG_UNK_3 => 'UNK-3' + ), + 'valueUNK' => '[span class=q10]unhandled value [b class=q1]%d[/b] provided for UnitFieldBytes1 on offset [b class=q1]%d[/b][/span]', + 'idxUNK' => '[span class=q10]unused offset [b class=q1]%d[/b] provided for UnitFieldBytes1[/span]' + ) + ), + 'smartAI' => array( + 'eventUNK' => '[span class=q10]Unknwon event #[b class=q1]%d[/b] in use.[/span]', + 'eventTT' => '[b class=q1]EventType %d[/b][br][table][tr][td]PhaseMask[/td][td=header]0x%04X[/td][/tr][tr][td]Chance[/td][td=header]%d%%%%[/td][/tr][tr][td]Flags[/td][td=header]0x%04X[/td][/tr][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][/table]', + 'events' => array( + SAI_EVENT_UPDATE_IC => ['(%7$d)?:When in combat, ;(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_UPDATE_OOC => ['(%7$d)?:When out of combat, ;(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_HEALT_PCT => ['At %6$s%% Health', 'Repeat every %s'], + SAI_EVENT_MANA_PCT => ['At %6$s%% Mana', 'Repeat every %s'], + SAI_EVENT_AGGRO => ['On Aggro', null], + SAI_EVENT_KILL => ['On killing (%3$d)?player:;(%4$d)?[npc=%4$d]:any creature;', 'Cooldown: %s'], + SAI_EVENT_DEATH => ['On death', null], + SAI_EVENT_EVADE => ['When evading', null], + SAI_EVENT_SPELLHIT => ['When hit by (%6$s)?%6$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SAI_EVENT_RANGE => ['On target at %6$sm', 'Repeat every %s'], +/* 10*/ SAI_EVENT_OOC_LOS => ['While out of combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SAI_EVENT_RESPAWN => ['On respawn', null], + SAI_EVENT_TARGET_HEALTH_PCT => ['On target at %6$s%% health', 'Repeat every %s'], + SAI_EVENT_VICTIM_CASTING => ['Current target is casting (%3$d)?[spell=%3$d]:any spell;', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_HEALTH => ['Friendly NPC within %2$dm is at %1$d health', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_IS_CC => ['Friendly NPC within %1$dm is crowd controlled', 'Repeat every %s'], + SAI_EVENT_FRIENDLY_MISSING_BUFF => ['Friendly NPC within %2$dm is missing [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_SUMMONED_UNIT => ['Just summoned (%1$d)?[npc=%1$d]:any creature;', 'Cooldown: %s'], + SAI_EVENT_TARGET_MANA_PCT => ['On target at %6$s%% mana', 'Repeat every %s'], + SAI_EVENT_ACCEPTED_QUEST => ['Giving (%1$d)?[quest=%1$d]:any quest;', null], +/* 20*/ SAI_EVENT_REWARD_QUEST => ['Rewarding (%1$d)?[quest=%1$d]:any quest;', null], + SAI_EVENT_REACHED_HOME => ['Arriving at home coordinates', null], + SAI_EVENT_RECEIVE_EMOTE => ['Being targeted with [emote=%1$d]', 'Cooldown: %s'], + SAI_EVENT_HAS_AURA => ['(%2$d)?Having %2$d stacks of:Missing aura; [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_TARGET_BUFFED => ['#target# has (%2$d)?%2$d stacks of:aura; [spell=%1$d]', 'Repeat every %s'], + SAI_EVENT_RESET => ['On reset', null], + SAI_EVENT_IC_LOS => ['While in combat, (%1$d)?friendly:hostile; (%5$d)?player:unit; enters line of sight within %2$dm', 'Cooldown: %s'], + SAI_EVENT_PASSENGER_BOARDED => ['A passenger has boarded', 'Cooldown: %s'], + SAI_EVENT_PASSENGER_REMOVED => ['A passenger got off', 'Cooldown: %s'], + SAI_EVENT_CHARMED => ['(%1$d)?On being charmed:On charm wearing off;', null], +/* 30*/ SAI_EVENT_CHARMED_TARGET => ['When charming #target#', null], + SAI_EVENT_SPELLHIT_TARGET => ['When #target# gets hit by (%6$s)?%6$s :;(%1$d)?[spell=%1$d]:Spell;', 'Cooldown: %s'], + SAI_EVENT_DAMAGED => ['After taking %6$s points of damage', 'Repeat every %s'], + SAI_EVENT_DAMAGED_TARGET => ['After #target# took %6$s points of damage', 'Repeat every %s'], + SAI_EVENT_MOVEMENTINFORM => ['Started moving to point #[b]%2$d[/b](%1$d)? using MotionType #[b]%1$d[/b]:;', null], + SAI_EVENT_SUMMON_DESPAWNED => ['Summoned [npc=%1$d] despawned', 'Cooldown: %s'], + SAI_EVENT_CORPSE_REMOVED => ['On corpse despawn', null], + SAI_EVENT_AI_INIT => ['AI initialized', null], + SAI_EVENT_DATA_SET => ['Data field #[b]%1$d[/b] is set to [b]%2$d[/b]', 'Cooldown: %s'], + SAI_EVENT_WAYPOINT_START => ['Start pathing on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], +/* 40*/ SAI_EVENT_WAYPOINT_REACHED => ['Reaching (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + null, + null, + null, + null, + null, + SAI_EVENT_AREATRIGGER_ONTRIGGER => ['On activation', null], + null, + null, + null, +/* 50*/ null, + null, + SAI_EVENT_TEXT_OVER => ['(%2$d)?[npc=%2$d]:any creature; is done talking TextGroup #[b]%1$d[/b]', null], + SAI_EVENT_RECEIVE_HEAL => ['Received %6$s points of healing', 'Cooldown: %s'], + SAI_EVENT_JUST_SUMMONED => ['On being summoned', null], + SAI_EVENT_WAYPOINT_PAUSED => ['Pausing path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_RESUMED => ['Resuming path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_STOPPED => ['Stopping path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_WAYPOINT_ENDED => ['Ending current path on (%1$d)?waypoint #[b]%1$d[/b]:any waypoint;(%2$d)? on path #[b]%2$d[/b]:;', null], + SAI_EVENT_TIMED_EVENT_TRIGGERED => ['Timed event #[b]%1$d[/b] is triggered', null], +/* 60*/ SAI_EVENT_UPDATE => ['(%6$s)?After %6$s:Instantly;', 'Repeat every %s'], + SAI_EVENT_LINK => ['After Event %6$s', null], + SAI_EVENT_GOSSIP_SELECT => ['Selecting Gossip Option:[br](%6$s)?[span class=q1]%6$s[/span]:Menu #[b]%1$d[/b] - Option #[b]%2$d[/b];', null], + SAI_EVENT_JUST_CREATED => ['On being spawned for the first time', null], + SAI_EVENT_GOSSIP_HELLO => ['Opening Gossip', null], + SAI_EVENT_FOLLOW_COMPLETED => ['Finished following', null], + SAI_EVENT_EVENT_PHASE_CHANGE => ['Event Phase changed and matches %6$s', null], + SAI_EVENT_IS_BEHIND_TARGET => ['Facing the backside of #target#', 'Cooldown: %s'], + SAI_EVENT_GAME_EVENT_START => ['[event=%1$d] started', null], + SAI_EVENT_GAME_EVENT_END => ['[event=%1$d] ended', null], +/* 70*/ SAI_EVENT_GO_STATE_CHANGED => ['State has changed', null], + SAI_EVENT_GO_EVENT_INFORM => ['Taxi path event #[b]%1$d[/b] trigered', null], + SAI_EVENT_ACTION_DONE => ['Executed action #[b]%1$d[/b] requested by script', null], + SAI_EVENT_ON_SPELLCLICK => ['Spellclick triggered', null], + SAI_EVENT_FRIENDLY_HEALTH_PCT => ['Health of #target# is at %6$s%%', 'Repeat every %s'], + SAI_EVENT_DISTANCE_CREATURE => ['[npc=%6$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], + SAI_EVENT_DISTANCE_GAMEOBJECT => ['[object=%6$d](%1$d)? with GUID #%1$d:; enters range at or below %2$dm', 'Repeat every %s'], + SAI_EVENT_COUNTER_SET => ['Counter #[b]%1$d[/b] is equal to [b]%2$d[/b]', null], + ), + 'eventFlags' => array( + SAI_EVENT_FLAG_NO_REPEAT => 'No Repeat', + SAI_EVENT_FLAG_DIFFICULTY_0 => 'Normal Dungeon', + SAI_EVENT_FLAG_DIFFICULTY_1 => 'Heroic Dungeon', + SAI_EVENT_FLAG_DIFFICULTY_2 => 'Normal Raid', + SAI_EVENT_FLAG_DIFFICULTY_3 => 'Heroic Raid', + SAI_EVENT_FLAG_NO_RESET => 'No Reset', + SAI_EVENT_FLAG_WHILE_CHARMED => 'While Charmed' + ), + 'actionUNK' => '[span class=q10]Unknown action #[b class=q1]%d[/b] in use.[/span]', + 'actionTT' => '[b class=q1]ActionType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]Param4[/td][td=header]%d[/td][/tr][tr][td]Param5[/td][td=header]%d[/td][/tr][tr][td]Param6[/td][td=header]%d[/td][/tr][/table]', + 'actions' => array( // [body, footer] + null, + SAI_ACTION_TALK => ['(%3$d)?Say:#target# says; (%7$d)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%8$s', 'Duration: %s'], + SAI_ACTION_SET_FACTION => ['(%1$d)?Set faction of #target# to [faction=%7$d]:Reset faction of #target#;.', null], + SAI_ACTION_MORPH_TO_ENTRY_OR_MODEL => ['(%7$d)?Reset apperance.:Take the appearance of;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], + SAI_ACTION_SOUND => ['Play sound(%2$d)? to invoking player:;:[div float=right width=270px][sound=%1$d][/div]', 'Played by environment.'], + SAI_ACTION_PLAY_EMOTE => ['Emote [emote=%1$d] to #target#.', null], + SAI_ACTION_FAIL_QUEST => ['Fail [quest=%1$d] for #target#.', null], + SAI_ACTION_OFFER_QUEST => ['(%2$d)?Add [quest=%1$d] to #target#\'s log:Offer [quest=%1$d] to #target#;.', null], + SAI_ACTION_SET_REACT_STATE => ['#target# becomes %7$s.', null], + SAI_ACTION_ACTIVATE_GOBJECT => ['#target# becomes activated.', null], +/* 10*/ SAI_ACTION_RANDOM_EMOTE => ['Emote %7$s to #target#.', null], + SAI_ACTION_CAST => ['Cast [spell=%1$d] at #target#.', null], + SAI_ACTION_SUMMON_CREATURE => ['Summon [npc=%1$d](%3$d)? for %7$d:;(%4$d)?, attacking invoker:;.', null], + SAI_ACTION_THREAT_SINGLE_PCT => ['Modify #target#\'s threat by %7$d%%.', null], + SAI_ACTION_THREAT_ALL_PCT => ['Modify the threat of all targets by %7$d%%.', null], + SAI_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS => ['Exploration event of [quest=%1$d] is completed for #target#.', null], + SAI_ACTION_SET_EMOTE_STATE => ['Continuously emote [emote=%1$d] to #target#.', null], + SAI_ACTION_SET_UNIT_FLAG => ['Set (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], + SAI_ACTION_REMOVE_UNIT_FLAG => ['Unset (%2$d)?UnitFlags2:UnitFlags; %7$s.', null], +/* 20*/ SAI_ACTION_AUTO_ATTACK => ['(%1$d)?Start:Stop; auto attacking #target#.', null], + SAI_ACTION_ALLOW_COMBAT_MOVEMENT => ['(%1$d)?Enable:Disable; combat movement.', null], + SAI_ACTION_SET_EVENT_PHASE => ['Set Event Phase of #target# to [b]%1$d[/b].', null], + SAI_ACTION_INC_EVENT_PHASE => ['(%1$d)?Increment:Decrement; Event Phase of #target#.', null], + SAI_ACTION_EVADE => ['#target# enters Evade Mode.', null], + SAI_ACTION_FLEE_FOR_ASSIST => ['Flee for assistance.', 'Use default flee emote'], + SAI_ACTION_CALL_GROUPEVENTHAPPENS => ['Satisfy objective of [quest=%1$d] for #target#.', null], + SAI_ACTION_COMBAT_STOP => ['End current combat.', null], + SAI_ACTION_REMOVEAURASFROMSPELL => ['Remove (%1$d)?all auras:auras of [spell=%1$d]; from #target#.', null], + SAI_ACTION_FOLLOW => ['Follow #target#(%1$d)? at %1$dm distance:;(%3$d)? until reaching [npc=%3$d]:;.', '(%7$d)?Angle: %7$.2f°:;(%8$d)? Some form of Quest Credit is given:;'], +/* 30*/ SAI_ACTION_RANDOM_PHASE => ['Pick random Event Phase from %7$s.', null], + SAI_ACTION_RANDOM_PHASE_RANGE => ['Pick random Event Phase between %1$d and %2$d.', null], + SAI_ACTION_RESET_GOBJECT => ['Reset #target#.', null], + SAI_ACTION_CALL_KILLEDMONSTER => ['A kill of [npc=%1$d] is credited to #target#.', null], + SAI_ACTION_SET_INST_DATA => ['Set Instance (%3$d)?Boss State:Data Field; #[b]]%1$d[/b] to [b]%2$d[/b].', null], + null, + SAI_ACTION_UPDATE_TEMPLATE => ['Transform to become [npc=%1$d](%2$d)? with level [b]%2$d[/b]:;.', null], + SAI_ACTION_DIE => ['Die...   painfully.', null], + SAI_ACTION_SET_IN_COMBAT_WITH_ZONE => ['Set in combat with units in zone.', null], + SAI_ACTION_CALL_FOR_HELP => ['Call for help.', 'Use default help emote'], +/* 40*/ SAI_ACTION_SET_SHEATH => ['Sheath %7$s weapons.', null], + SAI_ACTION_FORCE_DESPAWN => ['Despawn #target#(%1$d)? after %7$s:;(%2$d)? and then respawn after %8$s:;.', null], + SAI_ACTION_SET_INVINCIBILITY_HP_LEVEL => ['Become invincable below (%2$d)?%2$d%%:%1$d; HP.', null], + SAI_ACTION_MOUNT_TO_ENTRY_OR_MODEL => ['(%7$d)?Dismount.:Mount ;(%1$d)?[npc=%1$d].:;(%2$d)?[model npc=%2$d border=1 float=right][/model]:;', null], + SAI_ACTION_SET_INGAME_PHASE_MASK => ['Set visibility of #target# to phase %7$s.', null], + SAI_ACTION_SET_DATA => ['[b]%2$d[/b] is stored in data field #[b]%1$d[/b] of #target#.', null], + null, + SAI_ACTION_SET_VISIBILITY => ['#target# becomes (%1$d)?visible:invisible;.', null], + SAI_ACTION_SET_ACTIVE => ['#target# becomes Grid (%1$d)?active:inactive;.', null], + SAI_ACTION_ATTACK_START => ['Start attacking #target#.', null], +/* 50*/ SAI_ACTION_SUMMON_GO => ['Summon [object=%1$d](%2$d)? for ?%7$d:; at #target#.', 'Despawn linked to summoner'], + SAI_ACTION_KILL_UNIT => ['#target# dies!', null], + SAI_ACTION_ACTIVATE_TAXI => ['Fly from [span class=q1]%7$s[/span] to [span class=q1]%8$s[/span]', null], + SAI_ACTION_WP_START => ['(%1$d)?Walk:Run; on waypoint path #[b]%2$d[/b].(%4$d)? Is linked to [quest=%4$d].:; React %8$s while following the path.(%5$d)? Despawn after %7$s.:;', 'Repeatable'], + SAI_ACTION_WP_PAUSE => ['Pause waypoint path for %7$d.', null], + SAI_ACTION_WP_STOP => ['End waypoint path(%1$d)? and despawn after %7$s:;.(%8$d)? [quest=%2$d] fails.:;(%9$d)? [quest=%2$d] is completed.:;', null], + SAI_ACTION_ADD_ITEM => ['Give %2$d [item=%1$d] to #target#.', null], + SAI_ACTION_REMOVE_ITEM => ['Remove %2$d [item=%1$d] from #target#.', null], + SAI_ACTION_INSTALL_AI_TEMPLATE => ['Behave as a %7$s.', null], + SAI_ACTION_SET_RUN => ['(%1$d)?Enable:Disable; run speed.', null], +/* 60*/ SAI_ACTION_SET_DISABLE_GRAVITY => ['(%1$d)?Defy:Respect; gravity!', null], + SAI_ACTION_SET_SWIM => ['(%1$d)?Enable:Disable; swimming.', null], + SAI_ACTION_TELEPORT => ['#target# is teleported to [zone=%7$d].', null], + SAI_ACTION_SET_COUNTER => ['(%3$d)?Reset:Increase; Counter #[b]%1$d[/b] of #target#(%3$d)?: by [b]%2$d[/b];.', null], + SAI_ACTION_STORE_TARGET_LIST => ['Store #target# as target in #[b]%1$d[/b].', null], + SAI_ACTION_WP_RESUME => ['Continue on waypoint path.', null], + SAI_ACTION_SET_ORIENTATION => ['Set orientation to (%7$s)?face %7$s:Home Position;.', null], + SAI_ACTION_CREATE_TIMED_EVENT => ['(%8$d)?%6$d%% chance to:; Trigger timed event #[b]%1$d[/b](%7$s)? after %7$s:;.', 'Repeat every %s'], + SAI_ACTION_PLAYMOVIE => ['Play Movie #[b]%1$d[/b] to #target#.', null], + SAI_ACTION_MOVE_TO_POS => ['Move (%4$d)?within %4$dm of:to; Point #[b]%1$d[/b] at #target#(%2$d)? on a transport:;.', 'pathfinding disabled'], +/* 70*/ SAI_ACTION_ENABLE_TEMP_GOBJ => ['#target# is respawned for %7$s.', null], + SAI_ACTION_EQUIP => ['(%8$d)?Unequip non-standard items:Equip %7$s;(%1$d)? from equipment template #[b]%1$d[/b]:; on #target#.', 'Note: creature items do not nessecarily have an item template'], + SAI_ACTION_CLOSE_GOSSIP => ['Close Gossip Window.', null], + SAI_ACTION_TRIGGER_TIMED_EVENT => ['Trigger previously defined timed event #[b]%1$d[/b].', null], + SAI_ACTION_REMOVE_TIMED_EVENT => ['Delete previously defined timed event #[b]%1$d[/b].', null], + SAI_ACTION_ADD_AURA => ['Apply aura from [spell=%1$d] on #target#.', null], + SAI_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT => ['Set #target# as base for further SmartAI-Events.', null], + SAI_ACTION_RESET_SCRIPT_BASE_OBJECT => ['Reset base for SmartAI-Events.', null], + SAI_ACTION_CALL_SCRIPT_RESET => ['Reset current SmartAI.', null], + SAI_ACTION_SET_RANGED_MOVEMENT => ['Set ranged attack distance to [b]%1$d[/b]m(%2$d)?, at %2$d°:;.', null], +/* 80*/ SAI_ACTION_CALL_TIMED_ACTIONLIST => ['Call [html]Timed Actionlist #%1$d[/html]. Updates %7$s.', null], + SAI_ACTION_SET_NPC_FLAG => ['Set #target#\'s npc flags to %7$s.', null], + SAI_ACTION_ADD_NPC_FLAG => ['Add %7$s npc flags to #target#.', null], + SAI_ACTION_REMOVE_NPC_FLAG => ['Remove %7$s npc flags from #target#.', null], + SAI_ACTION_SIMPLE_TALK => ['#target# says (%7$s)?TextGroup:[span class=q10]unknown text[/span]; #[b]%1$d[/b] to #target#%7$s', null], + SAI_ACTION_INVOKER_CAST => ['Invoker casts [spell=%1$d] at #target#.', null], + SAI_ACTION_CROSS_CAST => ['%7$s casts [spell=%1$d] at #target#.', null], + SAI_ACTION_CALL_RANDOM_TIMED_ACTIONLIST => ['Call Timed Actionlist at random: [html]%7$s[/html]', null], + SAI_ACTION_CALL_RANDOM_RANGE_TIMED_ACTIONLIST => ['Call Timed Actionlist at random from range: [html]%7$s[/html]', null], + SAI_ACTION_RANDOM_MOVE => ['Move #target# to a random point within %1$dm.', null], +/* 90*/ SAI_ACTION_SET_UNIT_FIELD_BYTES_1 => ['Set UnitFieldBytes1 %7$s for #target#.', null], + SAI_ACTION_REMOVE_UNIT_FIELD_BYTES_1 => ['Unset UnitFieldBytes1 %7$s for #target#.', null], + SAI_ACTION_INTERRUPT_SPELL => ['Interrupt (%2$d)?cast of [spell=%2$d]:current spell cast;.', '(%1$d)?Instantly:Delayed;'], + SAI_ACTION_SEND_GO_CUSTOM_ANIM => ['Set animation progress to [b]%1$d[/b].', null], + SAI_ACTION_SET_DYNAMIC_FLAG => ['Set Dynamic Flag to %7$s on #target#.', null], + SAI_ACTION_ADD_DYNAMIC_FLAG => ['Add Dynamic Flag %7$s to #target#.', null], + SAI_ACTION_REMOVE_DYNAMIC_FLAG => ['Remove Dynamic Flag %7$s from #target#.', null], + SAI_ACTION_JUMP_TO_POS => ['Jump to fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f, [i]v[/i][sub]xy[/sub]: %1$.2f [i]v[/i][sub]z[/sub]: %2$.2f[/b]', null], + SAI_ACTION_SEND_GOSSIP_MENU => ['Display Gossip entry #[b]%1$d[/b] / TextID #[b]%2$d[/b].', null], + SAI_ACTION_GO_SET_LOOT_STATE => ['Set loot state of #target# to %7$s.', null], +/*100*/ SAI_ACTION_SEND_TARGET_TO_TARGET => ['Send targets stored in #[b]%1$d[/b] to #target#.', null], + SAI_ACTION_SET_HOME_POS => ['Set Home Position to (%10$d)?current position.:fixed position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b];', null], + SAI_ACTION_SET_HEALTH_REGEN => ['(%1$d)?Allow:Prevent; health regeneration for #target#.', null], + SAI_ACTION_SET_ROOT => ['(%1$d)?Prevent:Allow; movement for #target#.', null], + SAI_ACTION_SET_GO_FLAG => ['Set GameObject Flag to %7$s on #target#.', null], + SAI_ACTION_ADD_GO_FLAG => ['Add GameObject Flag %7$s to #target#.', null], + SAI_ACTION_REMOVE_GO_FLAG => ['Remove GameObject Flag %7$s from #target#.', null], + SAI_ACTION_SUMMON_CREATURE_GROUP => ['Summon Creature Group #[b]%1$d[/b](%2$d)?, attacking invoker:;.[br](%7$s)?[span class=breadcrumb-arrow] [/span]%7$s:[span class=q0][/span];', null], + SAI_ACTION_SET_POWER => ['%7$s is set to [b]%2$d[/b] for #target#.', null], + SAI_ACTION_ADD_POWER => ['Add [b]%2$d[/b] %7$s to #target#.', null], +/*110*/ SAI_ACTION_REMOVE_POWER => ['Remove [b]%2$d[/b] %7$s from #target#.', null], + SAI_ACTION_GAME_EVENT_STOP => ['Stop [event=%1$d].', null], + SAI_ACTION_GAME_EVENT_START => ['Start [event=%1$d].', null], + SAI_ACTION_START_CLOSEST_WAYPOINT => ['#target# starts moving along a defined waypoint path. Enter path on the closest of these nodes: %7$s.', null], + SAI_ACTION_MOVE_OFFSET => ['Move to relative position — [b]X: %7$.2f, Y: %8$.2f, Z: %9$.2f[/b]', null], + SAI_ACTION_RANDOM_SOUND => ['Play a random sound(%5$d)? to invoking player:;:[div float=right width=270px]%7$s[/div]', 'Played by environment.'], + SAI_ACTION_SET_CORPSE_DELAY => ['Set corpse despawn delay for #target# to %7$s.', null], + SAI_ACTION_DISABLE_EVADE => ['(%1$d)?Prevent:Allow; entering Evade Mode.', null], + SAI_ACTION_GO_SET_GO_STATE => ['Set gameobject state to %7$s.'. null], + SAI_ACTION_SET_CAN_FLY => ['(%1$d)?Enable:Disable; flight.', null], +/*120*/ SAI_ACTION_REMOVE_AURAS_BY_TYPE => ['Remove all Auras with [b]%7$s[/b] from #target#.', null], + SAI_ACTION_SET_SIGHT_DIST => ['Set sight range to %1$dm for #target#.', null], + SAI_ACTION_FLEE => ['#target# flees for assistance for %7$s.', null], + SAI_ACTION_ADD_THREAT => ['Modify threat level of #target# by %7$d points.', null], + SAI_ACTION_LOAD_EQUIPMENT => ['(%2$d)?Unequip non-standard items:Equip %7$s; from equipment template #[b]%1$d[/b] on #target#.', 'Note: creature items do not nessecarily have an item template'], + SAI_ACTION_TRIGGER_RANDOM_TIMED_EVENT => ['Trigger previously defined timed event in id range %7$s.', null], + SAI_ACTION_REMOVE_ALL_GAMEOBJECTS => ['Remove all gameobjects owned by #target#.', null], + SAI_ACTION_STOP_MOTION => ['(%1$d)?Remove motion type #[b]%1$d[/b] from #target#. :;(%2$d)?Stop moving.:;', null], + ), + 'targetUNK' => '[span class=q10]unknown target #[b class=q1]%d[/b][/span]', + 'targetTT' => '[b class=q1]TargetType %d[/b][br][table][tr][td]Param1[/td][td=header]%d[/td][/tr][tr][td]Param2[/td][td=header]%d[/td][/tr][tr][td]Param3[/td][td=header]%d[/td][/tr][tr][td]X[/td][td=header]%.2f[/td][/tr][tr][td]Y[/td][td=header]%.2f[/td][/tr][tr][td]Z[/td][td=header]%.2f[/td][/tr][tr][td]O[/td][td=header]%.2f[/td][/tr][/table]', + 'targets' => array( + null, + SAI_TARGET_SELF => 'self', + SAI_TARGET_VICTIM => 'current target', + SAI_TARGET_HOSTILE_SECOND_AGGRO => '2nd in threat list', + SAI_TARGET_HOSTILE_LAST_AGGRO => 'last in threat list', + SAI_TARGET_HOSTILE_RANDOM => 'random target', + SAI_TARGET_HOSTILE_RANDOM_NOT_TOP => 'random non-tank target', + SAI_TARGET_ACTION_INVOKER => 'Invoker', + SAI_TARGET_POSITION => 'world coordinates', + SAI_TARGET_CREATURE_RANGE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %4$sm', +/*10*/ SAI_TARGET_CREATURE_GUID => '(%4$d)?[npc=%4$d]:NPC; with GUID #%1$d', + SAI_TARGET_CREATURE_DISTANCE => '(%1$d)?random instance of [npc=%1$d]:arbitrary creature; within %4$sm', + SAI_TARGET_STORED => 'previously stored targets', + SAI_TARGET_GAMEOBJECT_RANGE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %4$sm', + SAI_TARGET_GAMEOBJECT_GUID => '(%4$d)?[object=%4$d]:gameobject; with GUID #%1$d', + SAI_TARGET_GAMEOBJECT_DISTANCE => '(%1$d)?random instance of [object=%1$d]:arbitrary object; within %4$sm', + SAI_TARGET_INVOKER_PARTY => 'Invokers party', + SAI_TARGET_PLAYER_RANGE => 'random player within %4$sm', + SAI_TARGET_PLAYER_DISTANCE => 'random player within %4$sm', + SAI_TARGET_CLOSEST_CREATURE => 'closest (%3$d)?dead:alive; (%1$d)?[npc=%1$d]:arbitrary creature; within %4$sm', +/*20*/ SAI_TARGET_CLOSEST_GAMEOBJECT => 'closest (%1$d)?[object=%1$d]:arbitrary gameobject; within %4$sm', + SAI_TARGET_CLOSEST_PLAYER => 'closest player within %1$dm', + SAI_TARGET_ACTION_INVOKER_VEHICLE => 'Invokers vehicle', + SAI_TARGET_OWNER_OR_SUMMONER => 'Invokers owner or summoner', + SAI_TARGET_THREAT_LIST => 'all units engaged in combat with self', + SAI_TARGET_CLOSEST_ENEMY => 'closest attackable (%2$d)?player:enemy; within %1$dm', + SAI_TARGET_CLOSEST_FRIENDLY => 'closest friendly (%2$d)?player:creature; within %1$dm', + SAI_TARGET_LOOT_RECIPIENTS => 'all players eligible for loot', + SAI_TARGET_FARTHEST => 'furthest engaged (%2$d)?player:creature; within %1$dm(%3$d)? and line of sight:;', + SAI_TARGET_VEHICLE_ACCESSORY => 'accessory in Invokers vehicle in seat %1$d' + ), + 'castFlags' => array( + SAI_CAST_FLAG_INTERRUPT_PREV => 'Interrupt current cast', + SAI_CAST_FLAG_TRIGGERED => 'Triggered', + SAI_CAST_FLAG_AURA_MISSING => 'Aura missing', + SAI_CAST_FLAG_COMBAT_MOVE => 'Combat movement' + ), + 'GOStates' => ['active', 'ready', 'active alternative'], + 'summonTypes' => [null, 'Despawn timed or when corpse disappears', 'Despawn timed or when dying', 'Despawn timed', 'Despawn timed out of combat', 'Despawn when dying', 'Despawn timed after death', 'Despawn when corpse disappears', 'Despawn manually'], + 'aiTpl' => ['basic AI', 'spell caster', 'turret', 'passive creature', 'cage for creature', 'caged creature'], + 'reactStates' => ['passive', 'defensive', 'aggressive', 'assisting'], + 'sheaths' => ['all', 'melee', 'ranged'], + 'saiUpdate' => ['out of combat', 'in combat', 'always'], + 'lootStates' => ['Not ready', 'Ready', 'Activated', 'Just Deactivated'], + + 'GOStateUNK' => '[span class=q10]unknown gameobject state #[b class=q1]%d[/b][/span]', + 'summonTypeUNK' => '[span class=q10]unknown SummonType #[b class=q1]%d[/b][/span]', + 'aiTplUNK' => '[span class=q10]unknown AI-Template #[b class=q1]%d[/b][/span]', + 'reactStateUNK' => '[span class=q10]unknown ReactState #[b class=q1]%d[/b][/span]', + 'sheathUNK' => '[span class=q10]unknown sheath #[b class=q1]%d[/b][/span]', + 'saiUpdateUNK' => '[span class=q10]unknown update condition #[b class=q1]%d[/b][/span]', + 'lootStateUNK' => '[span class=q10]unknown loot state #[b class=q1]%d[/b][/span]', + + 'empty' => '[span class=q0][/span]' ), 'account' => array( 'title' => "Aowow账号", @@ -462,7 +827,17 @@ $lang = array( 'triggeredBy' => "触发由", 'capturePoint' => "Capture Point", 'foundIn' => "这个对象能在以下地区找到:", - 'restock' => "Restocks every %s." + 'restock' => "Restocks every %s.", + 'goFlags' => array( + GO_FLAG_IN_USE => 'In use', + GO_FLAG_LOCKED => 'Locked', + GO_FLAG_INTERACT_COND => 'Cannot interact', + GO_FLAG_TRANSPORT => 'Transport', + GO_FLAG_NOT_SELECTABLE => 'Not selectable', + GO_FLAG_TRIGGERED => 'Triggered', + GO_FLAG_DAMAGED => 'Siege damaged', + GO_FLAG_DESTROYED => 'Siege destroyed' + ) ), 'npc' => array( 'notFound' => "这个NPC不存在。", @@ -500,6 +875,32 @@ $lang = array( "未分类", '野兽', '龙类', '恶魔', '元素生物', '巨人', '亡灵', '人型生物', '小动物', '机械', '未指定', '图腾', '非战斗宠物', '气体云雾' ), + 'npcFlags' => array( + NPC_FLAG_GOSSIP => 'Gossip', + NPC_FLAG_QUEST_GIVER => 'Quest Giver', + NPC_FLAG_TRAINER => 'Trainer', + NPC_FLAG_CLASS_TRAINER => 'Class Trainer', + NPC_PROFESSION_TRAINER => 'Profession Trainer', + NPC_FLAG_VENDOR => 'Vendor', + NPC_FLAG_VENDOR_AMMO => 'Ammo Vendor', + NPC_FLAG_VENDOR_FOOD => 'Food Vendor', + NPC_FLAG_VENDOR_POISON => 'Poison Vendor', + NPC_FLAG_VENDOR_REAGENT => 'Reagent Vendor', + NPC_FLAG_REPAIRER => 'Repair', + NPC_FLAG_FLIGHT_MASTER => 'Flight Master', + NPC_FLAG_SPIRIT_HEALER => 'Spirit Healer', + NPC_FLAG_SPIRIT_GUIDE => 'Spirit Guide', + NPC_FLAG_INNKEEPER => 'Innkeeper', + NPC_FLAG_BANKER => 'Banker', + NPC_FLAG_PETITIONER => 'Petitioner', + NPC_FLAG_GUILD_MASTER => 'Guild Master', + NPC_FLAG_BATTLEMASTER => 'Battle Master', + NPC_FLAG_AUCTIONEER => 'Auctioneer', + NPC_FLAG_STABLE_MASTER => 'Stable Master', + NPC_FLAG_GUILD_BANK => 'Guild Bank', + NPC_FLAG_SPELLCLICK => 'Spellclick', + NPC_FLAG_MAILBOX => 'Mailbox' + ) ), 'event' => array( 'notFound' => "这个世界事件不存在。", diff --git a/pages/areatrigger.php b/pages/areatrigger.php index 549eaf05..9e8049d5 100644 --- a/pages/areatrigger.php +++ b/pages/areatrigger.php @@ -93,8 +93,20 @@ class AreaTriggerPage extends GenericPage $map['extra'][$areaId] = ZoneList::getName($areaId); } - $this->map = $map; - $this->infobox = false; + // smart AI + $sai = null; + if ($_type == AT_TYPE_SMART) + { + $sai = new SmartAI(SAI_SRC_TYPE_AREATRIGGER, $this->typeId, ['name' => $this->name, 'teleportA' => $this->subject->getField('teleportA')]); + if ($sai->prepare()) + foreach ($sai->getJSGlobals() as $type => $typeIds) + $this->extendGlobalIds($type, $typeIds); + } + + + $this->map = $map; + $this->infobox = false; + $this->extraText = $sai ? $sai->getMarkdown() : null; $this->redButtons = array( BUTTON_LINKS => false, BUTTON_WOWHEAD => false @@ -130,88 +142,6 @@ class AreaTriggerPage extends GenericPage $this->lvTabs[] = ['areatrigger', ['data' => array_values($relTrigger->getListviewData()), 'name' => Util::ucFirst(Lang::game('areatrigger'))], 'areatrigger']; } } - else if ($_type == AT_TYPE_SMART) - { - // sourceType:2 [Areatrigger] implies eventTypes: 46, 61 [onTrigger, Linked] - $scripts = DB::World()->select('SELECT id, action_type, action_param1, action_param2, action_param3, action_param4, target_type, target_param1, target_param2 FROM smart_scripts WHERE entryorguid = ?d AND source_type = ?d ORDER BY id ASC', $this->typeId, 2); - - $tbl = ''; - - foreach ($scripts as $sc) - { - $action = ''; - $resolveTarget = function ($type, $guid) { - switch ($type) - { - case 7: // invoker - return 'Invoker'; - case 10: // creature guid entry - if ($id = DB::World()->selectCell('SELECT id FROM creature WHERE guid = ?d', $guid)) - { - $this->extendGlobalIds(TYPE_NPC, $id); - return '[npc='.$id.'] (GUID: '.$guid.')'; - } - else - return 'Unknown NPC with GUID: '.$guid; - case 14: // object guid entry - if ($id = DB::World()->selectCell('SELECT id FROM gameobject WHERE guid = ?d', $guid)) - { - $this->extendGlobalIds(TYPE_OBJECT, $id); - return '[object='.$id.'] (GUID: '.$guid.')'; - } - else - return 'Unknown GameObject with GUID: '.$guid; - default: - return 'Unhandled target #'.$type; - } - }; - - switch ($sc['action_type']) - { - case 15: // complete quest for {target} - $this->extendGlobalIds(TYPE_QUEST, $sc['action_param1']); - $action = '[quest='.$sc['action_param1'].'] is completed for '.$resolveTarget($sc['target_type'], $sc['target_param1']).'.'; - break; - case 33: // kill credit for {target} - $this->extendGlobalIds(TYPE_NPC, $sc['action_param1']); - $action = 'A kill of [npc='.$sc['action_param1'].'] is credited to '.$resolveTarget($sc['target_type'], $sc['target_param1']).'.'; - break; - case 45: // set data in field in {target} - $action = '\"'.$sc['action_param2'].'\" ist stored in field '.$sc['action_param1'].' of '.$resolveTarget($sc['target_type'], $sc['target_param1']).'.'; - break; - case 51: // kill {target} - $action = $resolveTarget($sc['target_type'], $sc['target_param1']).' dies!'; - break; - case 62: // {target} is teleported to map [resolved coords already stored in areatrigger entry] - $this->extendGlobalIds(TYPE_ZONE, $this->subject->getField('teleportA')); - $action = $resolveTarget($sc['target_type'], $sc['target_param1']).' is teleported to [zone='.$this->subject->getField('teleportA').'].'; - break; - case 64: // store {target} in - $action = 'Store '.$resolveTarget($sc['target_type'], $sc['target_param1']).' as target in \"'.$sc['action_param1'].'\".'; - break; - case 70: // respawn GO for sec - $action = $resolveTarget($sc['target_type'], $sc['target_param1']).' is respawned for '.Util::formatTime($sc['action_param1'] * 1000).'.'; - break; - case 85: // invoker cast spell with flags , at {target} - $this->extendGlobalIds(TYPE_SPELL, $sc['action_param1']); - $action = 'Invoker casts [spell='.$sc['action_param1'].'] at '.$resolveTarget($sc['target_type'], $sc['target_param1']).'.'; - break; - case 86: // entity by TargetingBlock(param3, param4, param5, param6) cross cast spell at {target} - $this->extendGlobalIds(TYPE_SPELL, $sc['action_param1']); - $action = $resolveTarget($sc['action_param3'], $sc['action_param4']).' casts [spell='.$sc['action_param1'].'] at '.$resolveTarget($sc['target_type'], $sc['target_param1']).'.'; - break; - case 100: // send targets stored in to entity {target} - $action = 'Send targets stored in \"'.$sc['action_param1'].'\" to '.$resolveTarget($sc['target_type'], $sc['target_param1']).'.'; - break; - default: - $action = 'Unhandled action '.$sc['action_type']; - } - - $tbl .= '[tr][td]'.$sc['id'].'[/td][td]'.$action.'[/td][/tr]'; - } - - $this->extraText = '[pad][h3]On Trigger: SmartAI[h3][table class=grid width=750px]'.$tbl.'[/table]'; - } } } diff --git a/pages/npc.php b/pages/npc.php index 9aea7ef7..d18ddfd0 100644 --- a/pages/npc.php +++ b/pages/npc.php @@ -317,14 +317,40 @@ class NpcPage extends GenericPage $map['extra'][$areaId] = ZoneList::getName($areaId); } - // consider pooled spawns + // smart AI + $sai = null; + if ($this->subject->getField('aiName') == 'SmartAI') + { + $sai = new SmartAI(SAI_SRC_TYPE_CREATURE, $this->typeId, ['name' => $this->name]); + if (!$sai->prepare()) // no smartAI found .. check per guid + { + // at least one of many + $guids = DB::World()->selectCol('SELECT guid FROM creature WHERE id = ?d', $this->typeId); + while ($_ = array_pop($guids)) + { + $sai = new SmartAI(SAI_SRC_TYPE_CREATURE, -$_, ['baseEntry' => $this->typeId, 'name' => $this->name, 'title' => ' [small](for GUID: '.$_.')[/small]']); + if ($sai->prepare()) + break; + } + } + if ($sai->prepare()) + { + foreach ($sai->getJSGlobals() as $type => $typeIds) + $this->extendGlobalIds($type, $typeIds); + } + else + trigger_error('Creature has SmartAI set in template but no SmartAI defined.'); + } + + // consider pooled spawns $this->map = $map; $this->infobox = '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]'; $this->placeholder = $placeholder; $this->accessory = $accessory; $this->quotes = $this->getQuotes(); $this->reputation = $this->getOnKillRep($_altIds, $mapType); + $this->smartAI = $sai ? $sai->getMarkdown() : null; $this->redButtons = array( BUTTON_WOWHEAD => true, BUTTON_LINKS => ['type' => $this->type, 'typeId' => $this->typeId], @@ -339,9 +365,6 @@ class NpcPage extends GenericPage /* Extra Tabs */ /**************/ - // tab: SAI - // hmm, how should this look like - // tab: abilities / tab_controlledabilities (dep: VehicleId) // SMART_SCRIPT_TYPE_CREATURE = 0; SMART_ACTION_CAST = 11; SMART_ACTION_ADD_AURA = 75; SMART_ACTION_INVOKER_CAST = 85; SMART_ACTION_CROSS_CAST = 86 $smartSpells = DB::World()->selectCol('SELECT action_param1 FROM smart_scripts WHERE source_type = 0 AND action_type IN (11, 75, 85, 86) AND entryOrGUID = ?d', $this->typeId); @@ -990,7 +1013,7 @@ class NpcPage extends GenericPage $this->typeId ); - foreach ($quoteSrc as $text) + foreach ($quoteSrc as $grp => $text) { $group = []; foreach ($text as $t) @@ -1035,7 +1058,7 @@ class NpcPage extends GenericPage } if ($group) - $quotes[] = $group; + $quotes[$grp] = $group; } return [$quotes, $nQuotes]; diff --git a/pages/object.php b/pages/object.php index 21291c7c..b15e2034 100644 --- a/pages/object.php +++ b/pages/object.php @@ -182,10 +182,13 @@ class ObjectPage extends GenericPage // AI if (User::isInGroup(U_GROUP_EMPLOYEE)) { - if ($_ = $this->subject->getField('ScriptName')) - $infobox[] = 'Script'.Lang::main('colon').$_; - else if ($_ = $this->subject->getField('AIName')) - $infobox[] = 'AI'.Lang::main('colon').$_; + if ($_ = $this->subject->getField('ScriptOrAI')) + { + if ($_ == 'SmartGameObjectAI') + $infobox[] = 'AI'.Lang::main('colon').$_; + else + $infobox[] = 'Script'.Lang::main('colon').$_; + } } @@ -224,9 +227,36 @@ class ObjectPage extends GenericPage $relBoss = [$c['id'], Util::localizedString($c, 'name')]; } - $this->infobox = $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null; + // smart AI + $sai = null; + if ($this->subject->getField('ScriptOrAI') == 'SmartGameObjectAI') + { + $sai = new SmartAI(SAI_SRC_TYPE_OBJECT, $this->typeId, ['name' => $this->name]); + if (!$sai->prepare()) // no smartAI found .. check per guid + { + // at least one of many + $guids = DB::World()->selectCol('SELECT guid FROM gameobject WHERE id = ?d LIMIT 1', $this->typeId); + while ($_ = array_pop($guids)) + { + $sai = new SmartAI(SAI_SRC_TYPE_OBJECT, -$_, ['name' => $this->name, 'title' => ' [small](for GUID: '.$_.')[/small]']); + if ($sai->prepare()) + break; + } + } + + if ($sai->prepare()) + { + foreach ($sai->getJSGlobals() as $type => $typeIds) + $this->extendGlobalIds($type, $typeIds); + } + else + trigger_error('Gameobject has AIName set in template but no SmartAI defined.'); + } + $this->map = $map; + $this->infobox = $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null; $this->relBoss = $relBoss; + $this->smartAI = $sai ? $sai->getMarkdown() : null; $this->redButtons = array( BUTTON_WOWHEAD => true, BUTTON_LINKS => ['type' => $this->type, 'typeId' => $this->typeId], diff --git a/static/js/Markup.js b/static/js/Markup.js index c41b0b9d..0cc4cd7f 100644 --- a/static/js/Markup.js +++ b/static/js/Markup.js @@ -909,7 +909,7 @@ var Markup = { }, fromHtml: function(str) { - return str.replace(/<(i|em)\b[\s\S]*?>([\s\S]*?)<\/\1>/gi, '[i]$1[/i]'); + return str.replace(/<(i|em)\b[\s\S]*?>([\s\S]*?)<\/\1>/gi, '[i]$2[/i]'); } }, icon: @@ -2735,7 +2735,9 @@ var Markup = { toHtml: function(attr) { attr.id = g_urlize(attr.name); var x = Markup.preview; - var str = '
'; + // Aowow - clear fucks with text layout near infobox + // var str = '
'; + var str = '
'; str += ''; str += tab.content; - str += '
'; + // Aowow - clear fucks with text layout near infobox + // str += '
'; str += ''; } @@ -2823,11 +2826,11 @@ var Markup = { for(var i = 0; i < m.length; ++i) { var border = m[i][1].match(/border[:="]+\s*([0-9]+)/i), - width = m[i][1].match(/width[:="]+\s*([0-9]+)/i), + width = m[i][1].match(/width[:="]+\s*([0-9]+(%|em|px)?)/i), spacing = m[i][1].match(/cellspacing="([\s\S]+?)"/i), padding = m[i][1].match(/cellpadding="([\s\S]+?)"/i); - str = str.replace(m[i][1] + m[i][0] + m[i][2], "\n" + Array(depth + 1).join("\t") + '[table' + (border ? ' border=' + border[1] : '') + (width ? ' width=' + width[1] : '') + (spacing ? ' cellspacing=' + spacing[1] : '') + (padding ? ' cellpadding=' + padding[1] : '') + ']' + Markup.tags.table.fromHtml(m[i][0], depth + 1) + "\n" + Array(depth + 1).join("\t") + '[/table]'); + str = str.replace(m[i][1] + m[i][0] + m[i][2], "\n" + Array(depth + 1).join("\t") + '[table' + (border ? ' border=' + border[1] : '') + (width ? ' width=' + width[1] + (width[2] ? '' : 'px') : '') + (spacing ? ' cellspacing=' + spacing[1] : '') + (padding ? ' cellpadding=' + padding[1] : '') + ']' + Markup.tags.table.fromHtml(m[i][0], depth + 1) + "\n" + Array(depth + 1).join("\t") + '[/table]'); } } @@ -2901,13 +2904,13 @@ var Markup = { { for(var i = 0; i < m.length; ++i) { - var width = m[i][1].match(/width[:="]+\s*([0-9]+)/i), - align = m[i][1].match(/align="([\s\S]+?)"/i), + var width = m[i][1].match(/width[:="]+\s*([0-9]+(%|em|px)?)/i), + align = m[i][1].match(/\balign="([\s\S]+?)"/i), valign = m[i][1].match(/valign="([\s\S]+?)"/i), colspan = m[i][1].match(/colspan="([\s\S]+?)"/i), rowspan = m[i][1].match(/rowspan="([\s\S]+?)"/i); - str = str.replace(m[i][1] + m[i][0] + m[i][2], "\n\t\t" + Array(depth + 1).join("\t") + '[td' + (t[j] == 'th' ? '=header' : '') + (width ? ' width=' + width[1] : '') + (align ? ' align=' + align[1] : '') + (valign ? ' valign=' + valign[1] : '') + (colspan ? ' colspan=' + colspan[1] : '') + (rowspan ? ' rowspan=' + rowspan[1] : '') + ']' + Markup.tags.td.fromHtml(m[i][0], depth + 1) + '[/td]'); + str = str.replace(m[i][1] + m[i][0] + m[i][2], "\n\t\t" + Array(depth + 1).join("\t") + '[td' + (t[j] == 'th' ? '=header' : '') + (width ? ' width=' + width[1] + (width[2] ? '' : 'px') : '') + (align ? ' align=' + align[1] : '') + (valign ? ' valign=' + valign[1] : '') + (colspan ? ' colspan=' + colspan[1] : '') + (rowspan ? ' rowspan=' + rowspan[1] : '') + ']' + Markup.tags.td.fromHtml(m[i][0], depth + 1) + '[/td]'); } } } diff --git a/template/pages/npc.tpl.php b/template/pages/npc.tpl.php index 895bf94f..e27fd234 100644 --- a/template/pages/npc.tpl.php +++ b/template/pages/npc.tpl.php @@ -51,7 +51,7 @@ if ($this->quotes[0]): $last = end($group); foreach ($group as $itr): - $_ = ($itr['type'] != 4 ? $this->name.' '.Lang::npc('textTypes', $itr['type']).Lang::main('colon').($itr['lang'] ? '['.$itr['lang'].']' : null) : null).$itr['text']; + $_ = ($itr['type'] != 4 ? $this->name.' '.Lang::npc('textTypes', $itr['type']).Lang::main('colon').($itr['lang'] ? '['.$itr['lang'].'] ' : null) : null).$itr['text']; echo '
'.($itr['range'] ? sprintf(Util::$dfnString, Lang::npc('textRanges', $itr['range']), $_) : $_).'
'; echo ($itr == $last) ? null : "\n
  • "; @@ -99,6 +99,20 @@ if ($this->reputation): endif; endforeach; endif; + +if (isset($this->smartAI)): +?> +
    + + +
    +

    diff --git a/template/pages/object.tpl.php b/template/pages/object.tpl.php index bb88ee5a..9fd96ccc 100644 --- a/template/pages/object.tpl.php +++ b/template/pages/object.tpl.php @@ -32,6 +32,20 @@ else: endif; $this->brick('book'); + +if (isset($this->smartAI)): +?> +
    + + +
    +