Skip to content

Commit

Permalink
Fix the crash introduced in #a5a6bf2
Browse files Browse the repository at this point in the history
  • Loading branch information
Olion17 authored and MadMaxMangos committed Aug 27, 2017
1 parent 112a418 commit a77de68
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/game/WorldHandlers/TaxiHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,15 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
recv_data >> movementInfo;
recv_data >> Unused<uint32>(); // unk


// a unit (player) path, like transport one, may contain arrive/departure events; signal the last node arrive here
// TODO find a way to send event for any path node? TODO is there a better way to get the last TaxiPathNodeEntry?
uint32 pathid = GetPlayer()->m_taxi.GetCurrentTaxiPath();
TaxiPathNodeList const& nlist = sTaxiPathNodesByPath[pathid];
if (uint32 eventid = nlist[nlist.size() - 1].arrivalEventID)
if (!sScriptMgr.OnProcessEvent(eventid, GetPlayer(), GetPlayer(), false))
GetPlayer()->GetMap()->ScriptsStart(DBS_ON_EVENT, eventid, GetPlayer(), GetPlayer());

if (uint32 pathid = GetPlayer()->m_taxi.GetCurrentTaxiPath())
{
TaxiPathNodeList const& nlist = sTaxiPathNodesByPath[pathid];
if (uint32 eventid = nlist[nlist.size() - 1].arrivalEventID)
if (!sScriptMgr.OnProcessEvent(eventid, GetPlayer(), GetPlayer(), false))
GetPlayer()->GetMap()->ScriptsStart(DBS_ON_EVENT, eventid, GetPlayer(), GetPlayer());
}

// in taxi flight packet received in 2 case:
// 1) end taxi path in far (multi-node) flight
Expand Down

0 comments on commit a77de68

Please sign in to comment.