mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[10299] Add new script call ProcessEventId
Let script library know when some event is about to start. Event id's may be found in several sources, such as spells, GO's and transport/taxi paths. Database scripts may be prevented by returning true from script side whenever needed. If false, DB script will run like normal. New database table event_id_scripts will need a ScriptName for the event id, in same way as for example areatrigger_scripts. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
28d1ac66c3
commit
2ad9cd34b2
16 changed files with 180 additions and 11 deletions
|
|
@ -39,6 +39,7 @@ alter table creature_movement add `wpguid` int(11) default '0';
|
|||
#include "CreatureAI.h"
|
||||
#include "WaypointManager.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "ScriptCalls.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
|
@ -412,7 +413,9 @@ void FlightPathMovementGenerator::DoEventIfAny(Player& player, TaxiPathNodeEntry
|
|||
if (uint32 eventid = departure ? node.departureEventID : node.arrivalEventID)
|
||||
{
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node.index, node.path, player.GetName());
|
||||
player.GetMap()->ScriptsStart(sEventScripts, eventid, &player, &player);
|
||||
|
||||
if (!Script->ProcessEventId(eventid, &player, &player, departure))
|
||||
player.GetMap()->ScriptsStart(sEventScripts, eventid, &player, &player);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue