mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-14 04:02:53 -04:00
Merge branch 'ObjectGuid' of https://github.com/TrinityCore/TrinityCore
Conflicts: src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Player/Player.h src/server/game/Scripting/MapScripts.cpp src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp src/server/scripts/Northrend/Nexus/Nexus/boss_anomalus.cpp src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp src/server/scripts/Northrend/Ulduar/HallsOfStone/halls_of_stone.cpp src/server/scripts/Northrend/Ulduar/Ulduar/boss_auriaya.cpp src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp src/server/scripts/Northrend/Ulduar/Ulduar/boss_razorscale.cpp src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp
This commit is contained in:
@@ -51,9 +51,6 @@ SmartScript::SmartScript()
|
||||
mUseTextTimer = false;
|
||||
mTalkerEntry = 0;
|
||||
mTemplate = SMARTAI_TEMPLATE_BASIC;
|
||||
meOrigGUID = 0;
|
||||
goOrigGUID = 0;
|
||||
mLastInvoker = 0;
|
||||
mScriptType = SMART_SCRIPT_TYPE_CREATURE;
|
||||
isProcessingTimedActionList = false;
|
||||
}
|
||||
@@ -79,7 +76,7 @@ void SmartScript::OnReset()
|
||||
}
|
||||
}
|
||||
ProcessEventsFor(SMART_EVENT_RESET);
|
||||
mLastInvoker = 0;
|
||||
mLastInvoker.Clear();
|
||||
}
|
||||
|
||||
void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob)
|
||||
@@ -509,10 +506,10 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
go->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) != 0);
|
||||
|
||||
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_CAST:: %s: %u casts spell %u on target %u with castflags %u",
|
||||
GetLogNameForGuid(me ? me->GetGUID() : go->GetGUID()), me ? me->GetGUIDLow() : go->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
|
||||
(me ? me->GetGUID() : go->GetGUID()).GetTypeName(), me ? me->GetGUIDLow() : go->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
|
||||
}
|
||||
else
|
||||
TC_LOG_DEBUG("scripts.ai", "Spell %u not cast because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId()));
|
||||
TC_LOG_DEBUG("scripts.ai", "Spell %u not cast because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (%s) already has the aura", e.action.cast.spell, (*itr)->GetGUID().ToString().c_str());
|
||||
}
|
||||
|
||||
delete targets;
|
||||
@@ -543,7 +540,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
tempLastInvoker->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
|
||||
}
|
||||
else
|
||||
TC_LOG_DEBUG("scripts.ai", "Spell %u not cast because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*itr)->GetGUID(), (*itr)->GetEntry(), uint32((*itr)->GetTypeId()));
|
||||
TC_LOG_DEBUG("scripts.ai", "Spell %u not cast because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (%s) already has the aura", e.action.cast.spell, (*itr)->GetGUID().ToString().c_str());
|
||||
}
|
||||
|
||||
delete targets;
|
||||
@@ -939,9 +936,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
if (!targets)
|
||||
break;
|
||||
|
||||
instance->SetData64(e.action.setInstanceData64.field, targets->front()->GetGUID());
|
||||
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA64: Field: %u, data: " UI64FMTD,
|
||||
e.action.setInstanceData64.field, targets->front()->GetGUID());
|
||||
instance->SetGuidData(e.action.setInstanceData64.field, targets->front()->GetGUID());
|
||||
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_SET_INST_DATA64: Field: %u, data: %s",
|
||||
e.action.setInstanceData64.field, targets->front()->GetGUID().ToString().c_str());
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
@@ -1558,20 +1555,20 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
{
|
||||
if (IsCreature(*itr))
|
||||
{
|
||||
if (!meOrigGUID)
|
||||
meOrigGUID = me ? me->GetGUID() : 0;
|
||||
if (!goOrigGUID)
|
||||
goOrigGUID = go ? go->GetGUID() : 0;
|
||||
if (!meOrigGUID && me)
|
||||
meOrigGUID = me->GetGUID();
|
||||
if (!goOrigGUID && go)
|
||||
goOrigGUID = go->GetGUID();
|
||||
go = NULL;
|
||||
me = (*itr)->ToCreature();
|
||||
break;
|
||||
}
|
||||
else if (IsGameObject(*itr))
|
||||
{
|
||||
if (!meOrigGUID)
|
||||
meOrigGUID = me ? me->GetGUID() : 0;
|
||||
if (!goOrigGUID)
|
||||
goOrigGUID = go ? go->GetGUID() : 0;
|
||||
if (!meOrigGUID && me)
|
||||
meOrigGUID = me->GetGUID();
|
||||
if (!goOrigGUID && go)
|
||||
goOrigGUID = go->GetGUID();
|
||||
go = (*itr)->ToGameObject();
|
||||
me = NULL;
|
||||
break;
|
||||
@@ -1713,7 +1710,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
unit->CastSpell((*it)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) != 0);
|
||||
}
|
||||
else
|
||||
TC_LOG_DEBUG("scripts.ai", "Spell %u not cast because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (Guid: " UI64FMTD " Entry: %u Type: %u) already has the aura", e.action.cast.spell, (*it)->GetGUID(), (*it)->GetEntry(), uint32((*it)->GetTypeId()));
|
||||
TC_LOG_DEBUG("scripts.ai", "Spell %u not cast because it has flag SMARTCAST_AURA_NOT_PRESENT and the target (%s) already has the aura", e.action.cast.spell, (*it)->GetGUID().ToString().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2627,7 +2624,7 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
||||
{
|
||||
if (me)
|
||||
{
|
||||
uint64 charmerOrOwnerGuid = me->GetCharmerOrOwnerGUID();
|
||||
ObjectGuid charmerOrOwnerGuid = me->GetCharmerOrOwnerGUID();
|
||||
|
||||
if (!charmerOrOwnerGuid)
|
||||
charmerOrOwnerGuid = me->GetCreatorGUID();
|
||||
|
||||
Reference in New Issue
Block a user