mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-15 04:32:35 -04:00
Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port
This commit is contained in:
@@ -172,6 +172,7 @@ void SmartScript::ResetBaseObject()
|
||||
go = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (!goOrigGUID.IsEmpty())
|
||||
{
|
||||
if (GameObject* o = ObjectAccessor::GetGameObject(*lookupRoot, goOrigGUID))
|
||||
@@ -185,7 +186,7 @@ void SmartScript::ResetBaseObject()
|
||||
meOrigGUID.Clear();
|
||||
}
|
||||
|
||||
void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob, std::string const& varString)
|
||||
void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob, std::string const& varString)
|
||||
{
|
||||
for (SmartAIEventList::iterator i = mEvents.begin(); i != mEvents.end(); ++i)
|
||||
{
|
||||
@@ -199,7 +200,7 @@ void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint3
|
||||
}
|
||||
}
|
||||
|
||||
void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob, std::string const& varString)
|
||||
void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob, std::string const& varString)
|
||||
{
|
||||
// calc random
|
||||
if (e.GetEventType() != SMART_EVENT_LINK && e.event.event_chance < 100 && e.event.event_chance)
|
||||
@@ -2351,7 +2352,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
}
|
||||
|
||||
void SmartScript::ProcessTimedAction(SmartScriptHolder& e, uint32 const& min, uint32 const& max, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob, std::string const& varString)
|
||||
void SmartScript::ProcessTimedAction(SmartScriptHolder& e, uint32 const& min, uint32 const& max, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob, std::string const& varString)
|
||||
{
|
||||
// We may want to execute action rarely and because of this if condition is not fulfilled the action will be rechecked in a long time
|
||||
if (sConditionMgr->IsObjectMeetingSmartEventConditions(e.entryOrGuid, e.event_id, e.source_type, unit, GetBaseObject()))
|
||||
@@ -2829,7 +2830,7 @@ void SmartScript::GetWorldObjectsInDist(ObjectVector& targets, float dist) const
|
||||
Cell::VisitAllObjects(obj, searcher, dist);
|
||||
}
|
||||
|
||||
void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, uint32 var1, bool bvar, const SpellInfo* spell, GameObject* gob, std::string const& varString)
|
||||
void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob, std::string const& varString)
|
||||
{
|
||||
if (!e.active && e.GetEventType() != SMART_EVENT_LINK)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user