diff options
10 files changed, 36 insertions, 35 deletions
diff --git a/sql/updates/world/2012_01_06_00_world_creature_template_addon.sql b/sql/updates/world/2012_01_06_00_world_creature_template_addon.sql new file mode 100644 index 00000000000..0ebc498ac03 --- /dev/null +++ b/sql/updates/world/2012_01_06_00_world_creature_template_addon.sql @@ -0,0 +1,4 @@ +-- Give Sai'kkal Invisibility aura to Sai'kkal +DELETE FROM `creature_template_addon` WHERE `entry`=22932; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(22932,0,0,0,0,'39680'); diff --git a/sql/updates/world/2012_01_06_11_world_sai.sql b/sql/updates/world/2012_01_06_11_world_sai.sql new file mode 100644 index 00000000000..c785030b93e --- /dev/null +++ b/sql/updates/world/2012_01_06_11_world_sai.sql @@ -0,0 +1,14 @@ +-- Quest "Torgos!" 10035 (A) - 10036 (H) +-- Converted to SAI +SET @TRACHELA := 21515; +SET @TORGOS := 18707; +DELETE FROM `creature` WHERE `id`=@TORGOS; -- Torgos must to appear only by quest +UPDATE `creature_template` SET `unit_flags`=`unit_flags`&~256 WHERE `entry`=@TORGOS; -- removing OOC +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@TORGOS,@TRACHELA); +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (@TORGOS,@TRACHELA); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@TORGOS,@TRACHELA); +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`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`,`comment`) VALUES +(@TRACHELA,0,0,0,0,0,100,0,5000,8000,10000,14000,11,32903,1,0,0,0,0,5,0,0,0,0,0,0,0, 'Trachela - On combat - Cast Fevered Disease'), +(@TORGOS,0,0,0,0,0,100,0,2000,5000,12000,20000,11,32022,1,0,0,0,0,2,0,0,0,0,0,0,0, 'Torgos - On combat - Cast Gut Rip'), +(@TORGOS,0,1,0,0,0,100,0,8000,10000,20000,25000,11,13579,1,0,0,0,0,3,0,0,0,0,0,0,0, 'Torgos - On combat - Cast Gouge'), +(@TORGOS,0,2,0,0,0,100,0,5000,8000,10000,14000,11,32903,1,0,0,0,0,5,0,0,0,0,0,0,0, 'Torgos - On combat - Cast Fevered Disease'); diff --git a/sql/updates/world/2012_01_06_12_world_sai.sql b/sql/updates/world/2012_01_06_12_world_sai.sql new file mode 100644 index 00000000000..b9c1319347d --- /dev/null +++ b/sql/updates/world/2012_01_06_12_world_sai.sql @@ -0,0 +1,2 @@ +UPDATE smart_scripts SET action_param2 = action_param3 WHERE action_type = 80; +UPDATE smart_scripts SET action_param3 = 0 WHERE action_type = 80;
\ No newline at end of file diff --git a/sql/updates/world/2012_01_07_00_world_creature_addon.sql b/sql/updates/world/2012_01_07_00_world_creature_addon.sql new file mode 100644 index 00000000000..83e1efbac80 --- /dev/null +++ b/sql/updates/world/2012_01_07_00_world_creature_addon.sql @@ -0,0 +1,2 @@ +-- A-Me 01 and Un'Goro Thunderer (only one) were emoting to be dead +UPDATE `creature_addon` SET `bytes1`=0 WHERE `guid` IN (24268,24081); diff --git a/sql/updates/world/2012_01_07_01_world_creature_template.sql b/sql/updates/world/2012_01_07_01_world_creature_template.sql new file mode 100644 index 00000000000..deba1c596f0 --- /dev/null +++ b/sql/updates/world/2012_01_07_01_world_creature_template.sql @@ -0,0 +1,8 @@ +-- Template updates for creature 36595 (Unleashed Soul) +UPDATE `creature_template` SET `exp`=2,`minlevel`=80,`maxlevel`=80,`baseattacktime`=2000,`speed_walk`=1.111112,`speed_run`=0.71429 WHERE `entry`=36595; -- Unleashed Soul +-- Model data 14594 (creature 36595 (Unleashed Soul)) +UPDATE `creature_model_info` SET `bounding_radius`=1.1,`combat_reach`=1.65,`gender`=2 WHERE `modelid`=14594; -- Unleashed Soul +-- Addon data for creature 36595 (Unleashed Soul) +DELETE FROM `creature_template_addon` WHERE `entry`=36595; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(36595,0,0,1,0, NULL); -- Unleashed Soul diff --git a/sql/updates/world/2012_01_07_02_world_gameobject_template.sql b/sql/updates/world/2012_01_07_02_world_gameobject_template.sql new file mode 100644 index 00000000000..438a49d969a --- /dev/null +++ b/sql/updates/world/2012_01_07_02_world_gameobject_template.sql @@ -0,0 +1,2 @@ +-- Fix Stratholme Service Gate Entrance +UPDATE `gameobject_template` SET `data1`=879 WHERE `entry`=175368; diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index b5fdf38a4b6..09d70204a7b 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -433,24 +433,13 @@ void SmartAI::MovementInform(uint32 MovementType, uint32 Data) void SmartAI::RemoveAuras() { + // Only loop throught the applied auras, because here is where all auras on the current unit are stored Unit::AuraApplicationMap appliedAuras = me->GetAppliedAuras(); - for (Unit::AuraApplicationMap::iterator iter = appliedAuras.begin(); iter != appliedAuras.end();) + for (Unit::AuraApplicationMap::iterator iter = appliedAuras.begin(); iter != appliedAuras.end(); ++iter) { Aura const* aura = iter->second->GetBase(); - if (!aura->GetSpellInfo()->HasAura(SPELL_AURA_CONTROL_VEHICLE) && !(iter->second->GetTarget() == me && aura->GetCaster() == me)) - me->_UnapplyAura(iter, AURA_REMOVE_BY_DEFAULT); - else - ++iter; - } - - Unit::AuraMap ownedAuras = me->GetOwnedAuras(); - for (Unit::AuraMap::iterator iter = ownedAuras.begin(); iter != ownedAuras.end();) - { - Aura* aura = iter->second; - if (!aura->GetSpellInfo()->HasAura(SPELL_AURA_CONTROL_VEHICLE)) - me->RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT); - else - ++iter; + if (!aura->GetSpellInfo()->IsPassive() && !aura->GetSpellInfo()->HasAura(SPELL_AURA_CONTROL_VEHICLE) && aura->GetCaster() != me) + me->RemoveAurasDueToSpell(aura->GetId()); } } diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index a2e70e9cbf2..d0c62f8092d 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -51,7 +51,6 @@ SmartScript::SmartScript() mTemplate = SMARTAI_TEMPLATE_BASIC; meOrigGUID = 0; goOrigGUID = 0; - mResumeActionList = true; mLastInvoker = 0; } @@ -78,22 +77,6 @@ void SmartScript::OnReset() void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob) { - if (e == SMART_EVENT_AGGRO) - { - if (!mResumeActionList) - mTimedActionList.clear();//clear action list if it is not resumable - else - { - for (SmartAIEventList::iterator itr = mTimedActionList.begin(); itr != mTimedActionList.end(); ++itr) - { - if (itr->enableTimed) - { - InitTimer((*itr));//re-init the currently enabled timer, so it restarts the timer when resumed - break; - } - } - } - } for (SmartAIEventList::iterator i = mEvents.begin(); i != mEvents.end(); ++i) { SMART_EVENT eventType = SMART_EVENT((*i).GetEventType()); @@ -3017,7 +3000,6 @@ void SmartScript::SetScript9(SmartScriptHolder& e, uint32 entry) i->event.type = SMART_EVENT_UPDATE_IC; else if (e.action.timedActionList.timerType > 1) i->event.type = SMART_EVENT_UPDATE; - mResumeActionList = e.action.timedActionList.dontResume ? false : true; InitTimer((*i)); } } diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h index 0193ac2bfb6..f55d91ed52f 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.h +++ b/src/server/game/AI/SmartScripts/SmartScript.h @@ -228,7 +228,6 @@ class SmartScript SmartAIEventList mEvents; SmartAIEventList mInstallEvents; SmartAIEventList mTimedActionList; - bool mResumeActionList; Creature* me; uint64 meOrigGUID; GameObject* go; diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index ec4355111b9..7cf290affe3 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -824,7 +824,6 @@ struct SmartAction struct { uint32 id; - uint32 dontResume; uint32 timerType; } timedActionList; |
