Skip to content

Commit d40ff6b

Browse files
committed
Revert "to core 10938. i'm enraged :("
This reverts commit 656321a.
1 parent 4eaf86a commit d40ff6b

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed

ScriptMgr.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -265,17 +265,6 @@ bool GOGossipHello(Player *pPlayer, GameObject *pGo)
265265
return tmpscript->pGOGossipHello(pPlayer, pGo);
266266
}
267267

268-
MANGOS_DLL_EXPORT
269-
bool GOHello(Player* pPlayer, GameObject* pGo)
270-
{
271-
Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId];
272-
273-
if (!tmpscript || !tmpscript->pGOHello)
274-
return false;
275-
276-
return tmpscript->pGOHello(pPlayer, pGo);
277-
}
278-
279268
MANGOS_DLL_EXPORT
280269
bool GossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
281270
{
@@ -378,7 +367,7 @@ bool QuestComplete(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
378367
}
379368

380369
MANGOS_DLL_EXPORT
381-
bool QuestRewarded(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
370+
bool ChooseReward(Player* pPlayer, Creature* pCreature, const Quest* pQuest, uint32 opt)
382371
{
383372
Script *tmpscript = m_scripts[pCreature->GetScriptId()];
384373

@@ -387,7 +376,7 @@ bool QuestRewarded(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
387376

388377
pPlayer->PlayerTalkClass->ClearMenus();
389378

390-
return tmpscript->pChooseReward(pPlayer, pCreature, pQuest);
379+
return tmpscript->pChooseReward(pPlayer, pCreature, pQuest, opt);
391380
}
392381

393382
MANGOS_DLL_EXPORT
@@ -442,6 +431,17 @@ bool ItemQuestAccept(Player* pPlayer, Item *_Item, const Quest* pQuest)
442431
return tmpscript->pItemQuestAccept(pPlayer,_Item, pQuest);
443432
}
444433

434+
MANGOS_DLL_EXPORT
435+
bool GOHello(Player* pPlayer, GameObject* pGo)
436+
{
437+
Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId];
438+
439+
if (!tmpscript || !tmpscript->pGOHello)
440+
return false;
441+
442+
return tmpscript->pGOHello(pPlayer, pGo);
443+
}
444+
445445
MANGOS_DLL_EXPORT
446446
bool GOQuestAccept(Player* pPlayer, GameObject* pGo, const Quest* pQuest)
447447
{
@@ -456,7 +456,7 @@ bool GOQuestAccept(Player* pPlayer, GameObject* pGo, const Quest* pQuest)
456456
}
457457

458458
MANGOS_DLL_EXPORT
459-
bool GOQuestRewarded(Player* pPlayer, GameObject* pGo, const Quest* pQuest)
459+
bool GOChooseReward(Player* pPlayer, GameObject* pGo, const Quest* pQuest, uint32 opt)
460460
{
461461
Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId];
462462

@@ -465,7 +465,7 @@ bool GOQuestRewarded(Player* pPlayer, GameObject* pGo, const Quest* pQuest)
465465

466466
pPlayer->PlayerTalkClass->ClearMenus();
467467

468-
return tmpscript->pGOChooseReward(pPlayer, pGo, pQuest);
468+
return tmpscript->pGOChooseReward(pPlayer, pGo, pQuest,opt);
469469
}
470470

471471
MANGOS_DLL_EXPORT

ScriptMgr.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct Script
3333
pGossipHello(NULL), pGOGossipHello(NULL), pGossipSelect(NULL), pGOGossipSelect(NULL),
3434
pGossipSelectWithCode(NULL), pGOGossipSelectWithCode(NULL),
3535
pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL),
36-
pChooseReward(NULL), pAreaTrigger(NULL), pProcessEventId(NULL), pItemQuestAccept(NULL),
36+
pChooseReward(NULL), pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pProcessEventId(NULL), pItemQuestAccept(NULL),
3737
pQuestAccept(NULL), pGOQuestAccept(NULL), pGOChooseReward(NULL), pItemUse(NULL),
3838
pEffectDummyCreature(NULL), pEffectDummyGameObj(NULL), pEffectDummyItem(NULL), pEffectAuraDummy(NULL),
3939
GetAI(NULL), GetInstanceData(NULL)
@@ -53,16 +53,16 @@ struct Script
5353
bool (*pQuestComplete )(Player*, Creature*, const Quest*);
5454
uint32 (*pNPCDialogStatus )(Player*, Creature*);
5555
uint32 (*pGODialogStatus )(Player*, GameObject*);
56-
bool (*pChooseReward )(Player*, Creature*, const Quest*);
56+
bool (*pChooseReward )(Player*, Creature*, const Quest*, uint32);
57+
bool (*pItemHello )(Player*, Item*, const Quest*);
58+
bool (*pGOHello )(Player*, GameObject*);
5759
bool (*pAreaTrigger )(Player*, AreaTriggerEntry const*);
5860
bool (*pProcessEventId )(uint32, Object*, Object*, bool);
5961
bool (*pItemQuestAccept )(Player*, Item*, const Quest*);
6062
bool (*pGOQuestAccept )(Player*, GameObject*, const Quest*);
61-
bool (*pGOChooseReward )(Player*, GameObject*, const Quest*);
63+
bool (*pGOChooseReward )(Player*, GameObject*, const Quest*, uint32);
6264
bool (*pItemUse )(Player*, Item*, SpellCastTargets const&);
6365
bool (*pGOUse )(Player*, GameObject*);
64-
bool (*pItemHello )(Player*, Item*, const Quest*);
65-
bool (*pGOHello )(Player*, GameObject*);
6666
bool (*pEffectDummyCreature )(Unit*, uint32, SpellEffectIndex, Creature*);
6767
bool (*pEffectDummyGameObj )(Unit*, uint32, SpellEffectIndex, GameObject*);
6868
bool (*pEffectDummyItem )(Unit*, uint32, SpellEffectIndex, Item*);

scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ CreatureAI* GetAI_npc_rocknot(Creature* pCreature)
679679
return new npc_rocknotAI(pCreature);
680680
}
681681

682-
bool ChooseReward_npc_rocknot(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
682+
bool ChooseReward_npc_rocknot(Player* pPlayer, Creature* pCreature, const Quest* pQuest, uint32 item)
683683
{
684684
ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
685685

scripts/eastern_kingdoms/stranglethorn_vale.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ bool GossipHello_npc_riggle_bassbait(Player* pPlayer, Creature* pCreature)
183183
return true;
184184
}
185185

186-
bool ChooseReward_npc_riggle_bassbait(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
186+
bool ChooseReward_npc_riggle_bassbait(Player* pPlayer, Creature* pCreature, const Quest* pQuest, uint32 uiItem)
187187
{
188188
// TODO: check if this can only be called if NPC has QUESTGIVER flag.
189189
if (pQuest->GetQuestId() == QUEST_MASTER_ANGLER && ((npc_riggle_bassbaitAI*)(pCreature->AI()))->bEventWinnerFound == false)

scripts/eastern_kingdoms/undercity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ CreatureAI* GetAI_npc_lady_sylvanas_windrunner(Creature* pCreature)
125125
return new npc_lady_sylvanas_windrunnerAI(pCreature);
126126
}
127127

128-
bool ChooseReward_npc_lady_sylvanas_windrunner(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
128+
bool ChooseReward_npc_lady_sylvanas_windrunner(Player* pPlayer, Creature* pCreature, const Quest* pQuest, uint32 slot)
129129
{
130130
if (pQuest->GetQuestId() == 9180)
131131
{

scripts/kalimdor/felwood.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ CreatureAI* GetAI_npc_niby_the_almighty(Creature* pCreature)
322322
return new npc_niby_the_almightyAI(pCreature);
323323
}
324324

325-
bool ChooseReward_npc_niby_the_almighty(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
325+
bool ChooseReward_npc_niby_the_almighty(Player* pPlayer, Creature* pCreature, const Quest* pQuest, uint32 slot)
326326
{
327327
if (pQuest->GetQuestId() == QUEST_KROSHIUS)
328328
{

0 commit comments

Comments
 (0)