Bonjour !
Ici j'ai juste rendus compatible mon scripts Maxskill pour mangos à TC2 :
[code=cpp]
#include "ScriptPCH.h"
class maxskill : public CreatureScript
{
public:
maxskill() : CreatureScript("maxskill") { }
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
{
pPlayer->ADD_GOSSIP_ITEM( 3, "Je veux un Maxskill" , GOSSIP_SENDER_MAIN, 1000);
pPlayer->ADD_GOSSIP_ITEM( 0, "Non merci, au revoir !" , GOSSIP_SENDER_MAIN, 1001);
pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
return true;
}
void SendDefaultMenu_maxskill(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
if (pPlayer->isInCombat())
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->MonsterSay("Tu es en combat !", LANG_UNIVERSAL, NULL);
return;
}
switch(uiAction)
{
case 1000:
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->UpdateSkillsToMaxSkillsForLevel();
pCreature->MonsterWhisper("Tu as bien reçu ton Maxskill", pPlayer->GetGUID());
break;
case 1001:
pPlayer->CLOSE_GOSSIP_MENU();
break;
}
}
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
if (uiSender == GOSSIP_SENDER_MAIN)
SendDefaultMenu_maxskill(pPlayer, pCreature, uiAction);
return true;
}
};
void AddSC_maxskill()
{
new maxskill;
}
[/code]
Un petit +1 peut me faire plaisir pour ce script