aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Creature.cpp')
-rw-r--r--src/game/Creature.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 34d37556a88..fc83a03237a 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -914,6 +914,10 @@ void Creature::prepareGossipMenu( Player *pPlayer,uint32 gossipid )
if(!isCanTrainingOf(pPlayer,false))
cantalking=false;
break;
+ case GOSSIP_OPTION_LEARNDUALSPEC:
+ if(!(pPlayer->GetSpecsCount() == 1 && isCanTrainingAndResetTalentsOf(pPlayer) && !(pPlayer->getLevel() < 40)))
+ cantalking=false;
+ break;
case GOSSIP_OPTION_UNLEARNTALENTS:
if(!isCanTrainingAndResetTalentsOf(pPlayer))
cantalking=false;
@@ -1061,6 +1065,29 @@ void Creature::OnGossipSelect(Player* player, uint32 option)
player->PlayerTalkClass->CloseGossip();
player->SendTalentWipeConfirm(guid);
break;
+ case GOSSIP_OPTION_LEARNDUALSPEC:
+ if(player->GetSpecsCount() == 1 && !(player->getLevel() < 40))
+ {
+ if (player->GetMoney() < 10000000)
+ {
+ player->SendBuyError( BUY_ERR_NOT_ENOUGHT_MONEY, 0, 0, 0);
+ player->PlayerTalkClass->CloseGossip();
+ break;
+ }
+ else
+ {
+ player->ModifyMoney(-10000000);
+
+ // Cast spells that teach dual spec
+ // Both are also ImplicitTarget self and must be cast by player
+ player->CastSpell(player,63680,true,NULL,NULL,player->GetGUID());
+ player->CastSpell(player,63624,true,NULL,NULL,player->GetGUID());
+
+ // Should show another Gossip text with "Congratulations..."
+ player->PlayerTalkClass->CloseGossip();
+ }
+ }
+ break;
case GOSSIP_OPTION_UNLEARNPETSKILLS:
player->PlayerTalkClass->CloseGossip();
player->SendPetSkillWipeConfirm();