mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Core/Misc: apply missile canceling codestyle changes based on master branch feedback
This commit is contained in:
@@ -70,8 +70,6 @@ class TC_COMMON_API BasicEvent
|
||||
uint64 m_execTime; // planned time of next execution, filled by event handler
|
||||
};
|
||||
|
||||
typedef std::multimap<uint64, BasicEvent*> EventList;
|
||||
|
||||
template<typename T>
|
||||
class LambdaBasicEvent : public BasicEvent
|
||||
{
|
||||
@@ -111,11 +109,11 @@ class TC_COMMON_API EventProcessor
|
||||
is_lambda_event<T> AddEventAtOffset(T&& event, Milliseconds offset, Milliseconds offset2) { AddEventAtOffset(new LambdaBasicEvent<T>(std::move(event)), offset, offset2); }
|
||||
void ModifyEventTime(BasicEvent* event, uint64 newTime);
|
||||
uint64 CalculateTime(uint64 t_offset) const { return m_time + t_offset; }
|
||||
EventList& GetEventList() { return m_events; }
|
||||
std::multimap<uint64, BasicEvent*>& GetEvents() { return m_events; }
|
||||
|
||||
protected:
|
||||
uint64 m_time;
|
||||
EventList m_events;
|
||||
std::multimap<uint64, BasicEvent*> m_events;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12517,10 +12517,8 @@ void Unit::SendPlaySpellVisualKit(uint32 id, uint32 type, uint32 duration) const
|
||||
|
||||
void Unit::CancelSpellMissiles(uint32 spellId, bool reverseMissile /*= false*/)
|
||||
{
|
||||
EventList& eventList = m_Events.GetEventList();
|
||||
bool hasMissile = false;
|
||||
|
||||
for (auto itr : eventList)
|
||||
for (auto itr : m_Events.GetEvents())
|
||||
{
|
||||
if (Spell const* spell = Spell::ExtractSpellFromEvent(itr.second))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user