aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_01_06_00_world_creature_template_addon.sql4
-rw-r--r--sql/updates/world/2012_01_06_11_world_sai.sql14
-rw-r--r--sql/updates/world/2012_01_06_12_world_sai.sql2
-rw-r--r--sql/updates/world/2012_01_07_00_world_creature_addon.sql2
-rw-r--r--sql/updates/world/2012_01_07_01_world_creature_template.sql8
-rw-r--r--sql/updates/world/2012_01_07_02_world_gameobject_template.sql2
-rw-r--r--sql/updates/world/2012_01_07_03_world_creature_template.sql8
-rw-r--r--sql/updates/world/2012_01_07_04_world_creature_loot_template.sql29
-rw-r--r--sql/updates/world/2012_01_07_05_world_creature_loot_template.sql4
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp19
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp18
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.h1
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h1
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp2
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/MiscHandler.cpp5
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/MovementHandler.cpp13
-rwxr-xr-xsrc/server/game/Server/WorldSession.cpp2
-rwxr-xr-xsrc/server/game/Server/WorldSession.h1
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp16
-rw-r--r--src/server/scripts/Commands/cs_account.cpp3
20 files changed, 101 insertions, 53 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/sql/updates/world/2012_01_07_03_world_creature_template.sql b/sql/updates/world/2012_01_07_03_world_creature_template.sql
new file mode 100644
index 00000000000..fdbdfc5a689
--- /dev/null
+++ b/sql/updates/world/2012_01_07_03_world_creature_template.sql
@@ -0,0 +1,8 @@
+-- Set standard immunities to The Nexus bosses.
+UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|1|2|4|8|16|32|64|256|512|1024|2048|4096|8192|65536|131072|262144|524288|4194304|8388608|67108864|536870912 WHERE `entry` IN
+(26731,30510, -- Grand Magus Telestra
+ 26763,30529, -- Anomalus
+ 26794,30532, -- Ormorok the Tree-Shaper
+ 26723,30540, -- Keristrasza
+ 26796,30398, -- Commander Stoutbeard
+ 26798,30397); -- Commander Kolurg
diff --git a/sql/updates/world/2012_01_07_04_world_creature_loot_template.sql b/sql/updates/world/2012_01_07_04_world_creature_loot_template.sql
new file mode 100644
index 00000000000..6855308ed82
--- /dev/null
+++ b/sql/updates/world/2012_01_07_04_world_creature_loot_template.sql
@@ -0,0 +1,29 @@
+-- Update Narain's Scrying Goggles
+SET @Item := 20951;
+DELETE FROM `creature_loot_template` WHERE `item`=@Item;
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(11502,@Item,-100,1,0,1,1), -- Ragnaros
+(11658,@Item,-100,1,0,1,1), -- Molten Giant
+(11659,@Item,-100,1,0,1,1), -- Molten Destroyer
+(11661,@Item,-100,1,0,1,1), -- Flamewaker
+(11662,@Item,-100,1,0,1,1), -- Flamewaker Priest
+(11663,@Item,-100,1,0,1,1), -- Flamewaker Healer
+(11664,@Item,-100,1,0,1,1), -- Flamewaker Elite
+(11665,@Item,-100,1,0,1,1), -- Lava Annihilator
+(11666,@Item,-100,1,0,1,1), -- Firewalker
+(11667,@Item,-100,1,0,1,1), -- Flameguard
+(11669,@Item,-100,1,0,1,1), -- Flame Imp
+(11673,@Item,-100,1,0,1,1), -- Ancient Core Hound
+(11982,@Item,-100,1,0,1,1), -- Magmadar
+(11988,@Item,-100,1,0,1,1), -- Golemagg the Incinerator
+(12056,@Item,-100,1,0,1,1), -- Baron Geddon
+(12057,@Item,-100,1,0,1,1), -- Garr
+(12076,@Item,-100,1,0,1,1), -- Lava Elemental
+(12098,@Item,-100,1,0,1,1), -- Sulfuron Harbinger
+(12100,@Item,-100,1,0,1,1), -- Lava Reaver
+(12101,@Item,-100,1,0,1,1), -- Lava Surger
+(12118,@Item,-100,1,0,1,1), -- Lucifron
+(12119,@Item,-100,1,0,1,1), -- Flamewaker Protector
+(12231,@Item,-100,1,0,1,1), -- Firelord
+(12259,@Item,-100,1,0,1,1), -- Gehennas
+(12264,@Item,-100,1,0,1,1); -- Shazzrah
diff --git a/sql/updates/world/2012_01_07_05_world_creature_loot_template.sql b/sql/updates/world/2012_01_07_05_world_creature_loot_template.sql
new file mode 100644
index 00000000000..5ffdb8f6261
--- /dev/null
+++ b/sql/updates/world/2012_01_07_05_world_creature_loot_template.sql
@@ -0,0 +1,4 @@
+-- correct id for firelord
+DELETE FROM `creature_loot_template` WHERE `entry` IN (12231,11668) AND `item`=20951;
+INSERT INTO `creature_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
+(11668,20951,-100,1,0,1,1); -- Firelord
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 69bdd23d069..1a26e241c5e 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 0001b3306ca..9cea61c0d2b 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());
@@ -3038,7 +3021,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 44414d6a4a2..6b99a7dc5be 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -831,7 +831,6 @@ struct SmartAction
struct
{
uint32 id;
- uint32 dontResume;
uint32 timerType;
} timedActionList;
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 09b19223039..6854a68ac1d 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -21733,6 +21733,8 @@ void Player::SendInitialPacketsBeforeAddToMap()
// SMSG_PET_GUIDS
// SMSG_UPDATE_WORLD_STATE
// SMSG_POWER_UPDATE
+
+ SetMover(this);
}
void Player::SendInitialPacketsAfterAddToMap()
diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
index d828a866c49..d5d205279f7 100755
--- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
@@ -169,6 +169,11 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_WHO Message");
+ time_t now = time(NULL);
+ if (now - timeLastWhoCommand < 5)
+ return;
+ else timeLastWhoCommand = now;
+
uint32 matchcount = 0;
uint32 level_min, level_max, racemask, classmask, zones_count, str_count;
diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
index 75bd2e2f66d..0c54a37c362 100755
--- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
@@ -472,18 +472,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
if (GetPlayer()->IsInWorld())
{
- if (Unit* mover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
- {
- GetPlayer()->SetMover(mover);
- if (mover != GetPlayer() && mover->canFly())
- {
- WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12);
- data.append(mover->GetPackGUID());
- data << uint32(0);
- SendPacket(&data);
- }
- }
- else
+ if (_player->m_mover->GetGUID() != guid)
{
sLog->outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " (%s - Entry: %u) and should be " UI64FMTD, guid, GetLogNameForGuid(guid), GUID_ENPART(guid), _player->m_mover->GetGUID());
GetPlayer()->SetMover(GetPlayer());
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index 11085c98d2c..6bd09f2b3a7 100755
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -94,7 +94,7 @@ m_playerRecentlyLogout(false), m_playerSave(false),
m_sessionDbcLocale(sWorld->GetAvailableDbcLocale(locale)),
m_sessionDbLocaleIndex(locale),
m_latency(0), m_TutorialsChanged(false), recruiterId(recruiter),
-isRecruiter(isARecruiter)
+isRecruiter(isARecruiter), timeLastWhoCommand(0)
{
if (sock)
{
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index fac910abc71..951f205c1e2 100755
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -949,6 +949,7 @@ class WorldSession
uint32 recruiterId;
bool isRecruiter;
ACE_Based::LockedQueue<WorldPacket*, ACE_Thread_Mutex> _recvQueue;
+ time_t timeLastWhoCommand;
};
#endif
/// @}
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 2a67d2e364c..58a37e75b2c 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -3096,9 +3096,15 @@ void AuraEffect::HandleModPossess(AuraApplication const* aurApp, uint8 mode, boo
}
if (apply)
- target->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp);
+ {
+ if (target->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp))
+ caster->ToPlayer()->SetMover(target);
+ }
else
+ {
target->RemoveCharmedBy(caster);
+ caster->ToPlayer()->SetMover(caster);
+ }
}
// only one spell has this aura
@@ -3126,11 +3132,13 @@ void AuraEffect::HandleModPossessPet(AuraApplication const* aurApp, uint8 mode,
if (caster->ToPlayer()->GetPet() != pet)
return;
- pet->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp);
+ if (pet->SetCharmedBy(caster, CHARM_TYPE_POSSESS, aurApp))
+ caster->ToPlayer()->SetMover(pet);
}
else
{
pet->RemoveCharmedBy(caster);
+ caster->ToPlayer()->SetMover(caster);
if (!pet->IsWithinDistInMap(caster, pet->GetMap()->GetVisibilityRange()))
pet->Remove(PET_SAVE_NOT_IN_SLOT, true);
@@ -4807,7 +4815,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
if (Aura* newAura = target->AddAura(71564, target))
newAura->SetStackAmount(newAura->GetSpellInfo()->StackAmount);
break;
- case 59628: // Tricks of the Trade
+ case 59628: // Tricks of the Trade
if (caster && caster->GetMisdirectionTarget())
target->SetReducedThreatPercent(100, caster->GetMisdirectionTarget()->GetGUID());
break;
@@ -4970,7 +4978,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
target->SetReducedThreatPercent(0,0);
else
target->SetReducedThreatPercent(0,caster->GetMisdirectionTarget()->GetGUID());
- break;
+ break;
}
default:
break;
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp
index bd415c0f79f..ac265acbf71 100644
--- a/src/server/scripts/Commands/cs_account.cpp
+++ b/src/server/scripts/Commands/cs_account.cpp
@@ -109,7 +109,8 @@ public:
{
case AOR_OK:
handler->PSendSysMessage(LANG_ACCOUNT_CREATED, accountName);
- sLog->outChar("Account: %d (IP: %s) Character:[%s] (GUID: %u) Change Password.", handler->GetSession()->GetAccountId(),handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUIDLow());
+ if (handler->GetSession())
+ sLog->outChar("Account: %d (IP: %s) Character:[%s] (GUID: %u) Change Password.", handler->GetSession()->GetAccountId(),handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName(), handler->GetSession()->GetPlayer()->GetGUIDLow());
break;
case AOR_NAME_TOO_LONG:
handler->SendSysMessage(LANG_ACCOUNT_TOO_LONG);