mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9715] Implement required basic elements for dual spec learn gossips.
Required DB data for real work. This is final part required at core side for support. Also note that commit include * generic implementation money cost gossip menu items so let implement in DB many money cost gossip operations with _fixed_ cost. * useful CONDITION_SPELL that let implemtn menu item visible if specific spell known/don't known also wide used case for diff gossips. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
f1af55f162
commit
da253087cb
4 changed files with 41 additions and 3 deletions
|
|
@ -12688,8 +12688,20 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me
|
|||
if (menuId != gossipmenu.GetMenuId())
|
||||
return;
|
||||
|
||||
uint32 gossipOptionId = gossipmenu.GetItem(gossipListId).m_gOptionId;
|
||||
GossipMenuItem const& menu_item = gossipmenu.GetItem(gossipListId);
|
||||
|
||||
uint32 gossipOptionId = menu_item.m_gOptionId;
|
||||
uint64 guid = pSource->GetGUID();
|
||||
uint32 moneyTake = menu_item.m_gBoxMoney;
|
||||
|
||||
// if this function called and player have money for pay MoneyTake or cheating, proccess both cases
|
||||
if (moneyTake > 0)
|
||||
{
|
||||
if (GetMoney() >= moneyTake)
|
||||
ModifyMoney(-int32(moneyTake));
|
||||
else
|
||||
return; // cheating
|
||||
}
|
||||
|
||||
if (pSource->GetTypeId() == TYPEID_GAMEOBJECT)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue