FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[1752] Add support for event 11225 at taxi arrival (ref. spell 31606 … · scriptdev2/scriptdev2-tbc@a388ffd · GitHub

Commit a388ffd

Browse files
NoFantasy
committed
[1752] Add support for event 11225 at taxi arrival (ref. spell 31606 and Mangos rev 10302)
Add support for event 11225 at taxi arrival (ref. spell 31606 and Mangos rev 10302) git-svn-id: https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2@1752 5f9c896b-1e26-0410-94da-f77f675e2462
1 parent 1930732 commit a388ffd

5 files changed

Lines changed: 31 additions & 5 deletions

File tree

‎ScriptMgr.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,14 +472,14 @@ bool AreaTrigger(Player* pPlayer, AreaTriggerEntry * atEntry)
472472
}
473473

474474
MANGOS_DLL_EXPORT
475-
bool ProcessEventId(uint32 uiEventId, Object* pSource, Object* pTarget, bool bData)
475+
bool ProcessEventId(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart)
476476
{
477477
Script *tmpscript = m_scripts[GetEventIdScriptId(uiEventId)];
478478
if (!tmpscript || !tmpscript->pProcessEventId)
479479
return false;
480480

481-
// bData may be true, when event is from taxi node events (arrival=false, departure=true)
482-
return tmpscript->pProcessEventId(uiEventId, pSource, pTarget, bData);
481+
// bIsStart may be false, when event is from taxi node events (arrival=false, departure=true)
482+
return tmpscript->pProcessEventId(uiEventId, pSource, pTarget, bIsStart);
483483
}
484484

485485
MANGOS_DLL_EXPORT

‎scripts/outland/zangarmarsh.cpp‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ npc_elder_kuruti
2828
npc_kayra_longmane
2929
npc_mortog_steamhead
3030
npc_timothy_daniels
31+
event_stormcrow
3132
EndContentData */
3233

3334
#include "precompiled.h"
@@ -364,9 +365,24 @@ bool GossipSelect_npc_timothy_daniels(Player* pPlayer, Creature* pCreature, uint
364365
}
365366

366367
/*######
367-
## AddSC
368+
## event_stormcrow
368369
######*/
369370

371+
enum
372+
{
373+
EVENT_ID_STORMCROW = 11225,
374+
};
375+
376+
bool ProcessEventId_event_taxi_stormcrow(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart)
377+
{
378+
if (uiEventId == EVENT_ID_STORMCROW && !bIsStart && pSource->GetTypeId() == TYPEID_PLAYER)
379+
{
380+
((Player*)pSource)->SetDisplayId(((Player*)pSource)->GetNativeDisplayId());
381+
return true;
382+
}
383+
return false;
384+
}
385+
370386
void AddSC_zangarmarsh()
371387
{
372388
Script *newscript;
@@ -407,4 +423,9 @@ void AddSC_zangarmarsh()
407423
newscript->pGossipHello = &GossipHello_npc_timothy_daniels;
408424
newscript->pGossipSelect = &GossipSelect_npc_timothy_daniels;
409425
newscript->RegisterSelf();
426+
427+
newscript = new Script;
428+
newscript->Name = "event_taxi_stormcrow";
429+
newscript->pProcessEventId = &ProcessEventId_event_taxi_stormcrow;
430+
newscript->RegisterSelf();
410431
}

‎sql/Updates/Makefile.am‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,5 @@ pkgdata_DATA = \
122122
r1737_scriptdev2.sql \
123123
r1741_mangos.sql \
124124
r1750_scriptdev2.sql \
125-
r1751_scriptdev2.sql
125+
r1751_scriptdev2.sql \
126+
r1752_mangos.sql

‎sql/Updates/r1752_mangos.sql‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
DELETE FROM event_id_scripts WHERE id=11225;
2+
INSERT INTO event_id_scripts VALUES (11225,'event_taxi_stormcrow');

‎sql/mangos_scriptname_full.sql‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,8 @@ UPDATE creature_template SET ScriptName='npc_rivern_frostwind' WHERE entry=10618
11931193
UPDATE creature_template SET ScriptName='npc_witch_doctor_mauari' WHERE entry=10307;
11941194

11951195
/* ZANGARMARSH */
1196+
DELETE FROM event_id_scripts WHERE id=11225;
1197+
INSERT INTO event_id_scripts VALUES (11225,'event_taxi_stormcrow');
11961198
UPDATE creature_template SET ScriptName='npcs_ashyen_and_keleth' WHERE entry IN (17900,17901);
11971199
UPDATE creature_template SET ScriptName='npc_cooshcoosh' WHERE entry=18586;
11981200
UPDATE creature_template SET ScriptName='npc_elder_kuruti' WHERE entry=18197;

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL