Skip to content

Commit 8a25b2f

Browse files
zergtmnNoFantasy
authored andcommitted
[1755] Make AreaTriggerEntry passed in script call const. Patch by zergtmn
Make AreaTriggerEntry passed in script call const. Patch by zergtmn git-svn-id: https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2@1755 5f9c896b-1e26-0410-94da-f77f675e2462
1 parent bccede9 commit 8a25b2f

13 files changed

Lines changed: 19 additions & 19 deletions

File tree

ScriptMgr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ bool GOChooseReward(Player* pPlayer, GameObject* pGo, const Quest* pQuest, uint3
462462
}
463463

464464
MANGOS_DLL_EXPORT
465-
bool AreaTrigger(Player* pPlayer, AreaTriggerEntry * atEntry)
465+
bool AreaTrigger(Player* pPlayer, AreaTriggerEntry const* atEntry)
466466
{
467467
Script *tmpscript = m_scripts[GetAreaTriggerScriptId(atEntry->id)];
468468

ScriptMgr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ struct Script
5555
bool (*pChooseReward )(Player*, Creature*, const Quest*, uint32);
5656
bool (*pItemHello )(Player*, Item*, const Quest*);
5757
bool (*pGOHello )(Player*, GameObject*);
58-
bool (*pAreaTrigger )(Player*, AreaTriggerEntry*);
58+
bool (*pAreaTrigger )(Player*, AreaTriggerEntry const*);
5959
bool (*pProcessEventId )(uint32, Object*, Object*, bool);
6060
bool (*pItemQuestAccept )(Player*, Item*, const Quest*);
6161
bool (*pGOQuestAccept )(Player*, GameObject*, const Quest*);

scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static uint32 RingBoss[]=
8383
9032, // Hedrum
8484
};
8585

86-
bool AreaTrigger_at_ring_of_law(Player* pPlayer, AreaTriggerEntry* pAt)
86+
bool AreaTrigger_at_ring_of_law(Player* pPlayer, AreaTriggerEntry const* pAt)
8787
{
8888
if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData())
8989
{

scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ InstanceData* GetInstanceData_instance_blackrock_spire(Map* pMap)
265265
return new instance_blackrock_spire(pMap);
266266
}
267267

268-
bool AreaTrigger_at_blackrock_spire(Player* pPlayer, AreaTriggerEntry* pAt)
268+
bool AreaTrigger_at_blackrock_spire(Player* pPlayer, AreaTriggerEntry const* pAt)
269269
{
270270
if (pPlayer->isDead())
271271
return false;

scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ enum
3535
QUEST_ERANIKUS_TYRANT_OF_DREAMS = 8733
3636
};
3737

38-
bool AreaTrigger_at_shade_of_eranikus(Player* pPlayer, AreaTriggerEntry *pAt)
38+
bool AreaTrigger_at_shade_of_eranikus(Player* pPlayer, AreaTriggerEntry const* pAt)
3939
{
4040
if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData())
4141
{

scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ CreatureAI* GetAI_boss_brutallus(Creature* pCreature)
192192
return new boss_brutallusAI(pCreature);
193193
}
194194

195-
bool AreaTrigger_at_madrigosa(Player* pPlayer, AreaTriggerEntry* pAt)
195+
bool AreaTrigger_at_madrigosa(Player* pPlayer, AreaTriggerEntry const* pAt)
196196
{
197197
if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData())
198198
{

scripts/examples/example_misc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ enum
2828
SAY_HI = -1999925
2929
};
3030

31-
bool AT_example_areatrigger(Player* pPlayer, AreaTriggerEntry *pAt)
31+
bool AT_example_areatrigger(Player* pPlayer, AreaTriggerEntry const* pAt)
3232
{
3333
DoScriptText(SAY_HI, pPlayer);
3434
return true;

scripts/kalimdor/the_barrens.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ CreatureAI* GetAI_npc_twiggy_flathead(Creature* pCreature)
465465
return new npc_twiggy_flatheadAI(pCreature);
466466
}
467467

468-
bool AreaTrigger_at_twiggy_flathead(Player* pPlayer, AreaTriggerEntry* pAt)
468+
bool AreaTrigger_at_twiggy_flathead(Player* pPlayer, AreaTriggerEntry const* pAt)
469469
{
470470
if (!pPlayer->isDead() && pPlayer->GetQuestStatus(QUEST_AFFRAY) == QUEST_STATUS_INCOMPLETE)
471471
{

scripts/northrend/naxxramas/instance_naxxramas.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ InstanceData* GetInstanceData_instance_naxxramas(Map* pMap)
604604
return new instance_naxxramas(pMap);
605605
}
606606

607-
bool AreaTrigger_at_naxxramas(Player* pPlayer, AreaTriggerEntry* pAt)
607+
bool AreaTrigger_at_naxxramas(Player* pPlayer, AreaTriggerEntry const* pAt)
608608
{
609609
if (pAt->id == AREATRIGGER_KELTHUZAD)
610610
{

scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ CreatureAI* GetAI_boss_skadi(Creature* pCreature)
121121
return new boss_skadiAI(pCreature);
122122
}
123123

124-
bool AreaTrigger_at_skadi(Player* pPlayer, AreaTriggerEntry* pAt)
124+
bool AreaTrigger_at_skadi(Player* pPlayer, AreaTriggerEntry const* pAt)
125125
{
126126
if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData())
127127
{

0 commit comments

Comments
 (0)