Jump to content

[Patch][7369] Titans Grip do not unlearn at reset talents


Guest LickedLurk

Recommended Posts

MangosRev. 7359

Linux Ubuntu DualCore

YTDB R.49 FIX 474

Patches: None

HEy Guys,

when my players get the talent "Titan Grip" when the skill the Furor-Tree, and after it they go to a teacher and reset there talents, Titan Grip is always there.

Thats a big problem for PvPServer, cause they can skill to another skilltree and also use TitanGrip.

Regards,

LickedLurk

Link to comment
Share on other sites

I thik we just forgot to add a line to Player::resetTalents:

diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index fd68866..8ab28e9 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -3331,6 +3331,9 @@ bool Player::resetTalents(bool no_cost)
    //FIXME: remove pet before or after unlearn spells? for now after unlearn to allow removing of talent related, pet affecting auras
    RemovePet(NULL,PET_SAVE_NOT_IN_SLOT, true);

+    if(GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
+       AutoUnequipOffhandIfNeed();
+       
    return true;
}

::Edit::

Probably we don't need this " if(GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))" the function checks it too.

Link to comment
Share on other sites

Good but it not fix problem for all cases:

1) if no place for unequip item must be send by mail as read soemwhere, this need be implemented in AutoUnequipOffhandIfNeed instead error message, example exist at items loading

2) problem can be not only with 2-h-weapon in main hand. Talen also allow equip 2H-weapon to offhand and this also must handles. Also can be checked in AutoUnequipOffhandIfNeed. Anyway without talent impossible have 2H-wepaon in offhand.

Link to comment
Share on other sites

hehhe, CanTitanGrip function looks strange:)

 
08:12:20 MSG_TALENT_WIPE_CONFIRM
08:12:20 Aura 108 now is remove mode 0
08:12:20 Aura 42 now is remove mode 0
08:12:20 Aura 42 now is remove mode 0
08:12:20 Aura 52 now is remove mode 0
08:12:20 Aura 42 now is remove mode 0
08:12:20 Aura 42 now is remove mode 0
08:12:20 Aura 122 now is remove mode 0
08:12:20 AURA MOD OFFHAND DAMAGE
08:12:20 Aura 108 now is remove mode 0
08:12:20 Aura 108 now is remove mode 0
08:12:20 Aura 42 now is remove mode 0
08:12:20 Aura 108 now is remove mode 0
[color=red]can titan's grip[/color]
08:12:20 08:12:20 Sending SMSG_SPELL_GO id=14867
08:12:20 AchievementMgr::UpdateAchievementCriteria(28, 14867, 0, 0)
08:12:20 AchievementMgr::UpdateAchievementCriteria(69, 14867, 0, 0)
08:12:20 Spell: Effect : 3
08:12:20 WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY
08:12:24 WORLD: CMSG_CHANNEL_VOICE_CHAT_QUERY
08:12:24 STORAGE_SIZE: 5
        04 00 00 00 00

2
2
222
22
2
22
222
2
222

222
2

Link to comment
Share on other sites

It's not strange. It how some skill spells work.

Ability set by spell with _effect_ not with _aura_. So only this Player variable store that ability applied when talent casted at learning. Same for parry learning spells for example. Maybe this varibale must just set to false explicitly at talent reset.

Anyway only talent set this ability at this moment.

Link to comment
Share on other sites

As this variable is used only for warriors, for all other classes it should be false (as partly you said).

This should solve it, please take a look at it.

diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index fd68866..1471f0c 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -3331,6 +3331,9 @@ bool Player::resetTalents(bool no_cost)
    //FIXME: remove pet before or after unlearn spells? for now after unlearn to allow removing of talent related, pet affecting auras
    RemovePet(NULL,PET_SAVE_NOT_IN_SLOT, true);

+    m_canTitanGrip = false;
+    AutoUnequipOffhandIfNeed();
+       
    return true;
}

@@ -18695,6 +18698,12 @@ void Player::AutoUnequipOffhandIfNeed()
    }
    else
    {
+        MailItemsInfo mi;
+        Item* item = offItem;
+        mi.AddItem(item->GetGUIDLow(), item->GetEntry(), item);
+        std::string subject = GetSession()->GetMangosString(LANG_NOT_EQUIPPED_ITEM);
+        RemoveItem(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND, true);
+        WorldSession::SendMailTo(this, MAIL_NORMAL, MAIL_STATIONERY_GM, GetGUIDLow(), GetGUIDLow(), subject, 0, &mi, 0, 0, MAIL_CHECK_MASK_NONE); 
        sLog.outError("Player::EquipItem: Can's store offhand item at 2hand item equip for player (GUID: %u).",GetGUIDLow());
    }
}

patchfile

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use