在职业训练师的选项中加入洗天赋
Index: game/Creature.cpp
===================================================================
--- game/Creature.cpp (revision 2508)
+++ game/Creature.cpp (working copy)
@@ -371,7 +371,10 @@
}
}
- if ( result == DIALOG_STATUS_UNAVAILABLE )
+ if (isCanTrainingOf(pPlayer, false))
+ return DIALOG_STATUS_CHAT;
+
+ if ( result == DIALOG_STATUS_UNAVAILABLE )
return result;
if ( defstatus == DIALOG_STATUS_NONE )
@@ -491,12 +494,11 @@
switch (gso->Action)
{
case GOSSIP_OPTION_QUESTGIVER:
- {
- uint32 quest_status = getDialogStatus(pPlayer,DIALOG_STATUS_NONE);
-
- if(quest_status == DIALOG_STATUS_NONE || quest_status == DIALOG_STATUS_UNAVAILABLE)
- cantalking=false;
- }; break;
+ pPlayer->repareQuestMenu(GetGUID());
+ if (pm->GetQuestMenu()->MenuItemCount() == 0)
+ cantalking=false;
+ pm->GetQuestMenu()->ClearMenu();
+ break;
case GOSSIP_OPTION_ARMORER:
cantalking=false; // added in special mode
break;
@@ -525,6 +527,10 @@
if(!isCanTrainingOf(pPlayer,false))
cantalking=false;
break;
+ case GOSSIP_OPTION_UNLEARNTALENTS:
+ if (!isCanTrainingOf(pPlayer,false) || pPlayer->getLevel() < 10)
+ cantalking=false;
+ break;
case GOSSIP_OPTION_TAXIVENDOR:
case GOSSIP_OPTION_GUARD:
case GOSSIP_OPTION_INNKEEPER:
@@ -637,6 +643,10 @@
case GOSSIP_OPTION_TRAINER:
player->GetSession()->SendTrainerList(guid);
break;
+ case GOSSIP_OPTION_UNLEARNTALENTS:
+ player->layerTalkClass->CloseGossip();
+ player->resetTalents();
+ break;
case GOSSIP_OPTION_TAXIVENDOR:
player->GetSession()->SendTaxiStatus(guid);
break;
Index: game/Creature.h
===================================================================
--- game/Creature.h (revision 2508)
+++ game/Creature.h (working copy)
@@ -57,7 +57,8 @@
GOSSIP_OPTION_BATTLEFIELD = 12, //UNIT_NPC_FLAG_BATTLEFIELDPERSON = 2048,
GOSSIP_OPTION_AUCTIONEER = 13, //UNIT_NPC_FLAG_AUCTIONEER = 4096,
GOSSIP_OPTION_STABLEPET = 14, //UNIT_NPC_FLAG_STABLE = 8192,
- GOSSIP_OPTION_ARMORER = 15 //UNIT_NPC_FLAG_ARMORER = 16384,
+ GOSSIP_OPTION_ARMORER = 15, //UNIT_NPC_FLAG_ARMORER = 16384,
+ GOSSIP_OPTION_UNLEARNTALENTS = 16 //UNIT_NPC_FLAG_TRAINER = 16,
};
enum Gossip_Guard
Index: game/Player.cpp
===================================================================
--- game/Player.cpp (revision 2508)
+++ game/Player.cpp (working copy)
@@ -10363,3 +10363,41 @@
data << pr1 << pr2;
GetSession()->SendPacket (&data);
}
+ 商业版发布站程序下载:www.98youx.com商业版发布站程序下载:www.98youx.com
===================================================================
--- game/Creature.cpp (revision 2508)
+++ game/Creature.cpp (working copy)
@@ -371,7 +371,10 @@
}
}
- if ( result == DIALOG_STATUS_UNAVAILABLE )
+ if (isCanTrainingOf(pPlayer, false))
+ return DIALOG_STATUS_CHAT;
+
+ if ( result == DIALOG_STATUS_UNAVAILABLE )
return result;
if ( defstatus == DIALOG_STATUS_NONE )
@@ -491,12 +494,11 @@
switch (gso->Action)
{
case GOSSIP_OPTION_QUESTGIVER:
- {
- uint32 quest_status = getDialogStatus(pPlayer,DIALOG_STATUS_NONE);
-
- if(quest_status == DIALOG_STATUS_NONE || quest_status == DIALOG_STATUS_UNAVAILABLE)
- cantalking=false;
- }; break;
+ pPlayer->repareQuestMenu(GetGUID());
+ if (pm->GetQuestMenu()->MenuItemCount() == 0)
+ cantalking=false;
+ pm->GetQuestMenu()->ClearMenu();
+ break;
case GOSSIP_OPTION_ARMORER:
cantalking=false; // added in special mode
break;
@@ -525,6 +527,10 @@
if(!isCanTrainingOf(pPlayer,false))
cantalking=false;
break;
+ case GOSSIP_OPTION_UNLEARNTALENTS:
+ if (!isCanTrainingOf(pPlayer,false) || pPlayer->getLevel() < 10)
+ cantalking=false;
+ break;
case GOSSIP_OPTION_TAXIVENDOR:
case GOSSIP_OPTION_GUARD:
case GOSSIP_OPTION_INNKEEPER:
@@ -637,6 +643,10 @@
case GOSSIP_OPTION_TRAINER:
player->GetSession()->SendTrainerList(guid);
break;
+ case GOSSIP_OPTION_UNLEARNTALENTS:
+ player->layerTalkClass->CloseGossip();
+ player->resetTalents();
+ break;
case GOSSIP_OPTION_TAXIVENDOR:
player->GetSession()->SendTaxiStatus(guid);
break;
Index: game/Creature.h
===================================================================
--- game/Creature.h (revision 2508)
+++ game/Creature.h (working copy)
@@ -57,7 +57,8 @@
GOSSIP_OPTION_BATTLEFIELD = 12, //UNIT_NPC_FLAG_BATTLEFIELDPERSON = 2048,
GOSSIP_OPTION_AUCTIONEER = 13, //UNIT_NPC_FLAG_AUCTIONEER = 4096,
GOSSIP_OPTION_STABLEPET = 14, //UNIT_NPC_FLAG_STABLE = 8192,
- GOSSIP_OPTION_ARMORER = 15 //UNIT_NPC_FLAG_ARMORER = 16384,
+ GOSSIP_OPTION_ARMORER = 15, //UNIT_NPC_FLAG_ARMORER = 16384,
+ GOSSIP_OPTION_UNLEARNTALENTS = 16 //UNIT_NPC_FLAG_TRAINER = 16,
};
enum Gossip_Guard
Index: game/Player.cpp
===================================================================
--- game/Player.cpp (revision 2508)
+++ game/Player.cpp (working copy)
@@ -10363,3 +10363,41 @@
data << pr1 << pr2;
GetSession()->SendPacket (&data);
}
+ 商业版发布站程序下载:www.98youx.com商业版发布站程序下载:www.98youx.com
Tags:
作者:佚名评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论