What bug does the patch fix? What features does the patch add?
Implements combat swapping for off-hand frills like on retail.
Also Implements triggering of spells 6119 and 6123 (combat swap GCD) when weapons are switched during combat.
For which SubVersion revision was the patch created?
SVN rev 6767
Who has been writing this patch? Please include either forum user names or email addresses.
Me (mobel). Forum display name used to be simak before the forums were moved here.
------------
Sorry for submitting this patch in SVN format, I'm still uncomfortable with the use of git. Learning slowly though.
Note that spells 6119 and 6123 do nothing atm, my patch only allows them to be cast upon weapon switch during combat (.cast 6119 in-game does nothing).
But when their dummy auras are implemented (not sure how to go about that yet, maybe for a future patch) Combat Swap GCD should work..I think.
Index: src/game/ItemPrototype.h
===================================================================
--- src/game/ItemPrototype.h (revision 6767)
+++ src/game/ItemPrototype.h (working copy)
@@ -552,6 +552,7 @@
{
case INVTYPE_RELIC:
case INVTYPE_SHIELD:
+ case INVTYPE_HOLDABLE:
return true;
}
Index: src/game/Player.cpp
===================================================================
--- src/game/Player.cpp (revision 6767)
+++ src/game/Player.cpp (working copy)
@@ -9921,6 +9921,7 @@
Item* Player::EquipItem( uint16 pos, Item *pItem, bool update )
{
+ uint32 GcdCombatSwitchSpell = 0;
if( pItem )
{
AddEnchantmentDurations(pItem);
@@ -9948,8 +9949,12 @@
if(pProto && isInCombat()&& pProto->Class == ITEM_CLASS_WEAPON && m_weaponChangeTimer == 0)
{
m_weaponChangeTimer = DEFAULT_SWITCH_WEAPON;
+ GcdCombatSwitchSpell = 6119;
if (getClass() == CLASS_ROGUE)
- m_weaponChangeTimer = ROGUE_SWITCH_WEAPON;
+ {
+ m_weaponChangeTimer = ROGUE_SWITCH_WEAPON;
+ GcdCombatSwitchSpell = 6123;
+ }
}
}
@@ -9992,7 +9997,7 @@
return pItem2;
}
}
-
+ if(GcdCombatSwitchSpell) CastSpell(this,GcdCombatSwitchSpell,true);
return pItem;
}