#include "StdAfx.h"
#include "Setup.h"
class SCRIPT_DECL BuffNPC1 : public GossipScript
{
public:
void GossipHello(Object * pObject, Player* Plr, bool AutoSend);
void GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
void GossipEnd(Object * pObject, Player* Plr);
void Destroy()
{
delete this;
}
};
void BuffNPC1::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
{
GossipMenu *Menu;
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
Menu->AddItem(0, " 10级保护 - 需要1金 " , 1);
Menu->AddItem(0, " 20级保护 - 需要2金 " , 2);
Menu->AddItem(0, " 30级保护 - 需要3金 " , 3);
Menu->AddItem(0, " 40级保护 - 需要4金 " , 4);
Menu->AddItem(0, " 50级保护 - 需要5金 " , 5);
if(AutoSend)
内容来自dedecms
Menu->SendTo(Plr);
}
void BuffNPC1::GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
{
Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL;
if(pCreature==NULL)
return;
GossipMenu * Menu;
switch(IntId)
{
case 0: // Return to start
GossipHello(pObject, Plr, true);
break;
case 1:
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
if(Plr->getLevel() >= 10)
{
Menu->AddItem(5, " 力量 " , 8);
Menu->AddItem(5, " 智力 " , 9);
内容来自dedecms
Menu->AddItem(5, " 毅力 " , 10);
Menu->AddItem(5, " 精神 " , 11);
Menu->AddItem(5, " 敏捷 " , 12);
Menu->AddItem(5, " 护甲 " , 43);
Menu->AddItem(0, " |cffff0000返回|r ", 99);
Menu->SendTo(Plr);
}
else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你必须到达10级才能使用这功能. " );
}
}
break;
case 2:
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
if(Plr->getLevel() >= 20)
{
Menu->AddItem(5, " 力量 " , 13);
本文来自织梦 Menu->AddItem(5, " 智力 " , 14);
Menu->AddItem(5, " 毅力 " , 15);
Menu->AddItem(5, " 精神 " , 16);
Menu->AddItem(5, " 敏捷 " , 17);
Menu->AddItem(5, " 护甲 " , 44);
Menu->AddItem(0, " |cffff0000返回|r ", 99);
Menu->SendTo(Plr);
}
else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你必须到达20级才能使用这功能. " );
}
}
break;
case 3:
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
if(Plr->getLevel() >= 30)
本文来自织梦
{
Menu->AddItem(5, " 力量 " , 18);
Menu->AddItem(5, " 智力 " , 19);
Menu->AddItem(5, " 毅力 " , 20);
Menu->AddItem(5, " 精神 " , 21);
Menu->AddItem(5, " 敏捷 " , 22);
Menu->AddItem(5, " 护甲 " , 45);
Menu->AddItem(0, " |cffff0000返回|r ", 99);
Menu->SendTo(Plr);
}
else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你必须到达30级才能使用这功能. " );
}
}
break;
case 4:
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
本文来自织梦 if(Plr->getLevel() >= 40)
{
Menu->AddItem(5, " 力量 " , 23);
Menu->AddItem(5, " 智力 " , 24);
Menu->AddItem(5, " 毅力 " , 25);
Menu->AddItem(5, " 精神 " , 26);
Menu->AddItem(5, " 敏捷 " , 27);
Menu->AddItem(5, " 护甲 " , 46);
Menu->AddItem(0, " |cffff0000返回|r ", 99);
Menu->SendTo(Plr);
}
else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你必须到达40级才能使用这功能. " );
}
}
break;
case 5:
本文来自织梦
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
if(Plr->getLevel() >= 50)
{
Menu->AddItem(5, " 力量 " , 28);
Menu->AddItem(5, " 智力 " , 29);
Menu->AddItem(5, " 毅力 " , 30);
Menu->AddItem(5, " 精神 " , 31);
Menu->AddItem(5, " 敏捷 " , 32);
Menu->AddItem(5, " 护甲 " , 47);
Menu->AddItem(0, " |cffff0000返回|r ", 99);
Menu->SendTo(Plr);
}
else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你必须到达50级才能使用这功能. " );
dedecms.com }
}
break;
// Level 10
case 8: // Strength
{
uint32 price=10000;// 1G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8118, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 9: // 智力
{
本文来自织梦 uint32 price=10000;// 1G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8096, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 10: // 毅力
{
uint32 price=10000;// 1G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
copyright dedecms int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8099, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 11: // 精神
{
uint32 price=10000;// 1G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8112, 0);
copyright dedecms
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 12: // 敏捷
{
uint32 price=10000;// 1G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8115, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
织梦内容管理系统
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
// Level 20
case 13: // 力量
{
uint32 price=20000;// 2G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8119, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
dedecms.com
}
}
break;
case 14: // 智力
{
uint32 price=20000;// 2G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8097, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 15: // 毅力
{
copyright dedecms
uint32 price=20000;// 2G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8100, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 16: // 精神
{
uint32 price=20000;// 2G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
织梦好,好织梦 int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8113, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 17: // 敏捷
{
uint32 price=20000;// 2G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8116, 0);
织梦内容管理系统 pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
// Level 30
case 18: // 力量
{
uint32 price=30000;// 3G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8120, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
织梦好,好织梦 pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 19: // 智力
{
uint32 price=30000;// 3G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8098, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
dedecms.com
}
break;
case 20: // 毅力
{
uint32 price=30000;// 3G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8101, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 21: // 精神
{
dedecms.com
uint32 price=30000;// 3G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8114, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 22: // 敏捷
{
uint32 price=30000;// 3G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
织梦好,好织梦 int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8117, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
// Level 40
case 23: // 力量
{
uint32 price=40000;// 4G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
copyright dedecms
pCreature->CastSpell(Plr, 12179, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 24: // 智力
{
uint32 price=40000;// 4G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 12176, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
本文来自织梦 }else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 25: // 毅力
{
uint32 price=40000;// 4G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 12178, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
内容来自dedecms }
}
break;
case 26: // 精神
{
uint32 price=40000;// 4G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 12177, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 27: // 敏捷
{
dedecms.com uint32 price=40000;// 4G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 12174, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
// Level 50
case 28: // 力量
{
uint32 price=50000;// 5G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
内容来自dedecms if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33082, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 29: // 智力
{
uint32 price=50000;// 5G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
织梦好,好织梦
pCreature->CastSpell(Plr, 33078, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 30: // 毅力
{
uint32 price=50000;// 5G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33081, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
本文来自织梦
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 31: // 精神
{
uint32 price=50000;// 5G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33080, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
织梦好,好织梦
}
}
break;
case 32: // 敏捷
{
uint32 price=50000;// 5G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33077, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 43: // 护甲
{
织梦好,好织梦 uint32 price=10000;// 1G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8091, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 44: // 护甲
{
uint32 price=20000;// 2G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
织梦好,好织梦 int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8094, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 45: // 护甲
{
uint32 price=30000;// 3G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8095, 0);
本文来自织梦
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 46: // 护甲
{
uint32 price=40000;// 4G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 12175, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
织梦好,好织梦 pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
}
break;
case 47: // 护甲
{
uint32 price=50000;// 5G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33079, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你已经受到祝福! " );
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, " 你没有足够的金币 $N. " );
}
内容来自dedecms }
break;
case 99: //main menu
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
Menu->AddItem(0, " 10级保护 - 需要1金 " , 1);
Menu->AddItem(0, " 20级保护 - 需要2金 " , 2);
Menu->AddItem(0, " 30级保护 - 需要3金 " , 3);
Menu->AddItem(0, " 40级保护 - 需要4金 " , 4);
Menu->AddItem(0, " 50级保护 - 需要5金 " , 5);
Menu->SendTo(Plr);
}
}
}
void BuffNPC1::GossipEnd(Object * pObject, Player* Plr)
{
GossipScript::GossipEnd(pObject, Plr);
本文来自织梦
}
void SetupBuffNPC1(ScriptMgr * mgr)
{
GossipScript * gs = (GossipScript*) new BuffNPC1();
/* Teleporter List */
mgr->register_gossip_script(88882, gs); // Osciron
}