一个系统完美功能选项够多的魔兽才能吸引更多的玩家,在游戏中经常会出现一些玩家技能加点出错,或者是技能加点方式不满意。这时玩家最需要的就是将技能加点清零重新选择加点方式,也就是洗天赋。这个功能在游戏中是非常重要的一个功能,直接左右了游戏的人气。本期小编的攻略就是怎样在职业训练师的选项中增加天赋洗点选项,具体操作方式如下:
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);
}
通过上述的脚本,插入游戏系统之后基本上都能在职业训练师选项中增加洗天赋选项,有了这个功能,玩家在游戏中才能在技能加点错误的情况下修改,游戏的玩家也才会越来越多。不知道各位站长是否有学到其中的精髓,实际掌握方式并不困难,只要gm按照小编的操作,一般都不会出现别的问题,这就是本期的增加职业训练师的天赋洗点功能选项的方式。
|
|