--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-31 14:17:57 -06:00
13 changed files with 186 additions and 231 deletions
+24
View File
@@ -2302,6 +2302,30 @@ bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, u
return tmpscript->pGossipSelectWithCode(player,_Creature,sender,action,sCode);
}
TRINITY_DLL_EXPORT
bool GOSelect( Player *player, GameObject *_GO, uint32 sender, uint32 action )
{
debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action);
Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];
if(!tmpscript || !tmpscript->pGOSelect) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pGOSelect(player,_GO,sender,action);
}
TRINITY_DLL_EXPORT
bool GOSelectWithCode( Player *player, GameObject *_GO, uint32 sender, uint32 action, const char* sCode )
{
debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action);
Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];
if(!tmpscript || !tmpscript->pGOSelectWithCode) return false;
player->PlayerTalkClass->ClearMenus();
return tmpscript->pGOSelectWithCode(player,_GO,sender,action,sCode);
}
TRINITY_DLL_EXPORT
bool QuestAccept( Player *player, Creature *_Creature, Quest const *_Quest )
{
+2
View File
@@ -45,6 +45,8 @@ struct Script
bool (*pQuestAccept )(Player*, Creature*, Quest const* );
bool (*pGossipSelect )(Player*, Creature*, uint32 , uint32 );
bool (*pGossipSelectWithCode)(Player*, Creature*, uint32 , uint32 , const char* );
bool (*pGOSelect )(Player*, GameObject*, uint32 , uint32 );
bool (*pGOSelectWithCode )(Player*, GameObject*, uint32 , uint32 , const char* );
bool (*pQuestSelect )(Player*, Creature*, Quest const* );
bool (*pQuestComplete )(Player*, Creature*, Quest const* );
uint32 (*pNPCDialogStatus )(Player*, Creature* );
@@ -219,6 +219,20 @@ bool GOHello_go_ethereum_prison(Player *player, GameObject* _GO)
return true;
}
/*######
## go_sacred_fire_of_life
######*/
#define NPC_ARIKARA 10882
bool GOHello_go_sacred_fire_of_life(Player* pPlayer, GameObject* pGO)
{
if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER)
pPlayer->SummonCreature(NPC_ARIKARA, -5008.338, -2118.894, 83.657, 0.874, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
return true;
}
void AddSC_go_scripts()
{
Script *newscript;
@@ -283,5 +297,10 @@ void AddSC_go_scripts()
newscript->pGOHello = &GOHello_go_ethereum_prison;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "go_sacred_fire_of_life";
newscript->pGOHello = &GOHello_go_sacred_fire_of_life;
newscript->RegisterSelf();
}
@@ -491,6 +491,56 @@ CreatureAI* GetAI_npc_isla_starmaneAI(Creature *_Creature)
return (CreatureAI*)thisAI;
}
/*######
## go_skull_pile
######*/
#define GOSSIP_S_DARKSCREECHER_AKKARAI "Summon Darkscreecher Akkarai"
#define GOSSIP_S_KARROG "Summon Karrog"
#define GOSSIP_S_GEZZARAK_THE_HUNTRESS "Summon Gezzarak the Huntress"
#define GOSSIP_S_VAKKIZ_THE_WINDRAGER "Summon Vakkiz the Windrager"
bool GossipHello_go_skull_pile(Player *player, GameObject* _GO)
{
if (player->GetQuestStatus(11885) == QUEST_STATUS_INCOMPLETE)
{
player->ADD_GOSSIP_ITEM(1, GOSSIP_S_DARKSCREECHER_AKKARAI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->ADD_GOSSIP_ITEM(2, GOSSIP_S_KARROG, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->ADD_GOSSIP_ITEM(3, GOSSIP_S_GEZZARAK_THE_HUNTRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->ADD_GOSSIP_ITEM(4, GOSSIP_S_VAKKIZ_THE_WINDRAGER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
}
player->SEND_GOSSIP_MENU(_GO->GetGOInfo()->questgiver.gossipID, _GO->GetGUID());
return true;
}
void SendActionMenu_go_skull_pile(Player *player, GameObject* _GO, uint32 action)
{
switch(action)
{
case GOSSIP_ACTION_INFO_DEF + 1:
player->CastSpell(player,40642,false);
break;
case GOSSIP_ACTION_INFO_DEF + 2:
player->CastSpell(player,40640,false);
break;
case GOSSIP_ACTION_INFO_DEF + 3:
player->CastSpell(player,40632,false);
break;
case GOSSIP_ACTION_INFO_DEF + 4:
player->CastSpell(player,40644,false);
break;
}
}
bool GossipSelect_go_skull_pile(Player *player, GameObject* _GO, uint32 sender, uint32 action )
{
switch(sender)
{
case GOSSIP_SENDER_MAIN: SendActionMenu_go_skull_pile(player, _GO, action); break;
}
return true;
}
void AddSC_terokkar_forest()
{
Script *newscript;
@@ -532,5 +582,12 @@ void AddSC_terokkar_forest()
newscript->GetAI = &GetAI_npc_isla_starmaneAI;
newscript->pQuestAccept = &QuestAccept_npc_isla_starmane;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="go_skull_pile";
newscript->pGOHello = &GossipHello_go_skull_pile;
newscript->pGOSelect = &GossipSelect_go_skull_pile;
newscript->RegisterSelf();
}