diff options
Diffstat (limited to 'src/game/CreatureEventAIMgr.cpp')
-rw-r--r-- | src/game/CreatureEventAIMgr.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/game/CreatureEventAIMgr.cpp b/src/game/CreatureEventAIMgr.cpp index 38cc84177e4..901ec541455 100644 --- a/src/game/CreatureEventAIMgr.cpp +++ b/src/game/CreatureEventAIMgr.cpp @@ -39,7 +39,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Texts() objmgr.LoadTrinityStrings(WorldDatabase,"creature_ai_texts",MIN_CREATURE_AI_TEXT_STRING_ID,MAX_CREATURE_AI_TEXT_STRING_ID); // Gather Additional data from EventAI Texts - QueryResult *result = WorldDatabase.PQuery("SELECT entry, sound, type, language, emote FROM creature_ai_texts"); + QueryResult *result = WorldDatabase.Query("SELECT entry, sound, type, language, emote FROM creature_ai_texts"); sLog.outString("Loading EventAI Texts additional data..."); if (result) @@ -117,8 +117,8 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Summons() //Drop Existing EventSummon Map m_CreatureEventAI_Summon_Map.clear(); - //Gather additional data for EventAI - QueryResult *result = WorldDatabase.PQuery("SELECT id, position_x, position_y, position_z, orientation, spawntimesecs FROM creature_ai_summons"); + // Gather additional data for EventAI + QueryResult *result = WorldDatabase.Query("SELECT id, position_x, position_y, position_z, orientation, spawntimesecs FROM creature_ai_summons"); if (result) { barGoLink bar(result->GetRowCount()); @@ -169,8 +169,8 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() //Drop Existing EventAI List m_CreatureEventAI_Event_Map.clear(); - //Gather event data - QueryResult *result = WorldDatabase.PQuery("SELECT id, creature_id, event_type, event_inverse_phase_mask, event_chance, event_flags, " + // Gather event data + QueryResult *result = WorldDatabase.Query("SELECT id, creature_id, event_type, event_inverse_phase_mask, event_chance, event_flags, " "event_param1, event_param2, event_param3, event_param4, " "action1_type, action1_param1, action1_param2, action1_param3, " "action2_type, action2_param1, action2_param2, action2_param3, " @@ -473,9 +473,8 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() action.morph.modelId = 0; } } - - break; } + break; case ACTION_T_SOUND: if (!sSoundEntriesStore.LookupEntry(action.sound.soundId)) sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant SoundID %u.", i, j+1, action.sound.soundId); @@ -662,6 +661,16 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() action.set_sheath.sheath = SHEATH_STATE_UNARMED; } break; + case ACTION_T_SET_INVINCIBILITY_HP_LEVEL: + if(action.invincibility_hp_level.is_percent) + { + if(action.invincibility_hp_level.hp_level > 100) + { + sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses wrong percent value %u.", i, j+1, action.invincibility_hp_level.hp_level); + action.invincibility_hp_level.hp_level = 100; + } + } + break; case ACTION_T_EVADE: //No Params case ACTION_T_FLEE_FOR_ASSIST: //No Params case ACTION_T_DIE: //No Params |