Permalink
Browse files

[sd2_mr0343] fix TOC5 by VirusGoD pointing. not tested.

  • Loading branch information...
1 parent 2d5359b commit ee6a906fab16f13ac891d8787104331ebe6d6686 @rsa rsa committed Jan 27, 2012
@@ -106,19 +106,21 @@ bool GossipHello_npc_toc5_announcer(Player* pPlayer, Creature* pCreature)
bool GossipSelect_npc_toc5_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
- ScriptedInstance* m_pInstance;
- m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
+ if (!pPlayer || !pCreature)
+ return true;
+
+ ScriptedInstance* m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
pPlayer->CLOSE_GOSSIP_MENU();
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
{
- if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == 0)
+ if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) != 0)
{
m_pInstance->SetData(DATA_TOC5_ANNOUNCER, pCreature->GetEntry());
- if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_ARELAS))
+ if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == DATA_ARELAS)
{
m_pInstance->SetData(DATA_BLACK_KNIGHT_MINION, 35564);
switch(urand(0, 4))
@@ -151,7 +153,7 @@ bool GossipSelect_npc_toc5_announcer(Player* pPlayer, Creature* pCreature, uint3
} while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_3) || m_pInstance->GetData(DATA_CHAMPIONID_2) == m_pInstance->GetData(DATA_CHAMPIONID_3));
}
- if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_JAEREN))
+ if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == DATA_JAEREN)
{
m_pInstance->SetData(DATA_BLACK_KNIGHT_MINION, 123);
View
@@ -1,4 +1,4 @@
#ifndef __SD2_REVISION_R2_H__
#define __SD2_REVISION_R2_H__
- #define SD2_REVISION_R2 "0342"
+ #define SD2_REVISION_R2 "0343"
#endif // __SD2_REVISION_R2_H__

0 comments on commit ee6a906

Please sign in to comment.