New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Warrior][Talent] Titan's Grip - Damage Reduction #6375
Comments
confirm |
source: Mangos Fix try: diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index b9e2b49..e26bdf9 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -4225,7 +4225,11 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank)
}
if (spell_id == 46917 && m_canTitanGrip)
+ {
SetCanTitanGrip(false);
+ // Remove Titan's Grip damage penalty now
+ RemoveAurasDueToSpell(49152);
+ }
if (spell_id == 674 && m_canDualWield)
SetCanDualWield(false);
@@ -12717,6 +12721,9 @@ Item* Player::EquipItem(uint16 pos, Item* pItem, bool update)
return pItem2;
}
+ // Apply Titan's Grip damage penalty if necessary
+ if ((slot == EQUIPMENT_SLOT_MAINHAND || slot == EQUIPMENT_SLOT_OFFHAND) && CanTitanGrip() && HasTwoHandWeaponInOneHand() && !HasAura(49152))
+ CastSpell(this, 49152, true);
// only for full equip instead adding to stack
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM, pItem->GetEntry());
@@ -12741,6 +12748,9 @@ void Player::QuickEquipItem(uint16 pos, Item* pItem)
pItem->AddToWorld();
pItem->SendUpdateToPlayer(this);
}
+ // Apply Titan's Grip damage penalty if necessary
+ if ((slot == EQUIPMENT_SLOT_MAINHAND || slot == EQUIPMENT_SLOT_OFFHAND) && CanTitanGrip() && HasTwoHandWeaponInOneHand() && !HasAura(49152))
+ CastSpell(this, 49152, true);
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EQUIP_ITEM, pItem->GetEntry());
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_EQUIP_EPIC_ITEM, pItem->GetEntry(), slot);
@@ -12854,7 +12864,12 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update)
SetUInt64Value(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), 0);
if (slot < EQUIPMENT_SLOT_END)
+ {
SetVisibleItemSlot(slot, NULL);
+ // Remove Titan's Grip damage penalty if necessary
+ if ((slot == EQUIPMENT_SLOT_MAINHAND || slot == EQUIPMENT_SLOT_OFFHAND) && CanTitanGrip() && !HasTwoHandWeaponInOneHand())
+ RemoveAurasDueToSpell(49152);
+ }
}
else if (Bag* pBag = GetBagByPos(bag))
pBag->RemoveItem(slot, update);
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 5556130..490dfb3 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -1363,6 +1363,12 @@ class Player : public Unit, public GridObject<Player>
Item* mainItem = GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
return mainItem && mainItem->GetTemplate()->InventoryType == INVTYPE_2HWEAPON && !CanTitanGrip();
}
+ bool HasTwoHandWeaponInOneHand() const
+ {
+ Item* offItem = GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
+ Item* mainItem = GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
+ return offItem && ((mainItem && mainItem->GetTemplate()->InventoryType == INVTYPE_2HWEAPON) || offItem->GetTemplate()->InventoryType == INVTYPE_2HWEAPON);
+ }
void SendNewItem(Item* item, uint32 count, bool received, bool created, bool broadcast = false);
bool BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot);
bool _StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot, int32 price, ItemTemplate const* pProto, Creature* pVendor, VendorItem const* crItem, bool bStore);
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index c59c978..bb39d6c 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -6431,8 +6431,12 @@ void Spell::EffectTitanGrip(SpellEffIndex /*effIndex*/)
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
return;
- if (m_caster->GetTypeId() == TYPEID_PLAYER)
- m_caster->ToPlayer()->SetCanTitanGrip(true);
+ if (Player* player = (Player*)m_caster)
+ {
+ player->SetCanTitanGrip(true);
+ if (player->HasTwoHandWeaponInOneHand() && !player->HasAura(49152))
+ player->CastSpell(player, 49152, true);
+ }
}
void Spell::EffectRedirectThreat(SpellEffIndex /*effIndex*/) |
Titan's Grip is not bugged while equipping 2 weapons, only while equipping one weapon. The real bug is actually a display bug. If you try with this patch , you have a penality of 20% while equipping two 2H-weapons. |
no it is not, you can try test your damage and calculate it, now with 2h weapons you have no penalty |
that patch check if player already has aura 49152 (titan grip penalty aura) before cast it |
try with .list aura command^^ |
Damage reduction part still doesnt work. Should someone try implementing Vincent's fix? |
Confirm Rev: 27f0918 TDB: TDB 335.49+ |
Still bugged. When anyone has the time, please look at Vincent's patch fix or tell us why it hasnt been implemented yet. |
Confirming on |
Still bugged, any progress? |
@Vincent-Michael, patch works for me! |
Confirmed! |
Is this still considered a valid issue? I can't find the aura 49152 on my toon when dual-wielding two-hand weps atm with Titan's Grip alot of people say it is working as intended and the 10% IS indeed getting reduced but i don't see the spell or any piece of code in the source handling the effect, |
Still not fixed on rev. 5b5c093 |
Do some testing first, if this is really not working as it should I can check and fix it. |
Fix by: @Vincent-Michael work here. |
Hey @Vincent-Michael Divine Intervetion (spell id: 19752) of Paladins, remove reduction. |
If anything here is valid plz open a PR for it. |
@Vincent-Michael can you merge this? |
I'm using Vincent-Michael fix, and works fine case 49152: //Titan's Grip
spellInfo->Attributes |= SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY;
break; will fix this exploit: #6375 (comment) |
Same for other immunity effects, such as Hand of Protection |
how is this possible? titan's grip has SPELL_ATTR0_PASSIVE |
Is there any progress with this spell? It's literally been three years. Don't misunderstand me I do not complain but I'm confused, I see a lot of inputs and someone even suggested a possible fix. |
…e auras (even if negative) Ref issue #6375
…e auras (even if negative) Ref issue TrinityCore#6375
Closes TrinityCore#6375 (cherry picked from commit a4baef1) Core/Player: unconditionally remove Titan's grip penalty aura on Spell removal Was causing an issue when switching spec, because off hand weapon was still equipped (cherry picked from commit df0f88e)
…e auras (even if negative) Ref issue TrinityCore#6375 (cherry picked from commit b2fbd2c)
…e auras (even if negative) Ref issue TrinityCore#6375
Closes TrinityCore#6375 (cherry picked from commit a4baef1) Core/Player: unconditionally remove Titan's grip penalty aura on Spell removal Was causing an issue when switching spec, because off hand weapon was still equipped (cherry picked from commit df0f88e)
…e auras (even if negative) Ref issue TrinityCore#6375 (cherry picked from commit b2fbd2c)
rev.: b53485e
tdb 46
wiki says: Patch 3.1.0 (2009-04-14): 10% damage decrease
Reduction part of this talent does not work anymore.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: