All pastes #609710 Raw Edit

Etwas

public text v1 · immutable
·published 2007-07-09 01:18 UTC
rendered paste body
Index: src/game/Player.cpp
===================================================================
--- src/game/Player.cpp	(revision 4039)
+++ src/game/Player.cpp	(working copy)
@@ -177,6 +177,7 @@
     m_canParry = false;
     m_canDualWield = false;
     m_extraAttacks = 0;
+    m_extraAttacksTime;
 
     ////////////////////Rest System/////////////////////
     time_inn_enter=0;
@@ -5583,7 +5584,14 @@
 
             if(enchant_display!=4 && enchant_display!=2 && enchant_display!=5 && IsItemSpellToCombat(enchantSpell_info))
                 if (roll_chance_f(chance))
+                {
+                    if ( enchantSpell_info->Id == 10610) //remove winfury totem perm enchant after proc
+                    {
+                        ApplyEnchantment(item,EnchantmentSlot(e_slot),false);
+                        item->SetEnchantment(EnchantmentSlot(e_slot), enchantSpell_info->Id, 0, 0);
+                    }
                     this->CastSpell(Target, enchantSpell_info->Id, true);
+                }
         }
     }
 }
Index: src/game/Player.h
===================================================================
--- src/game/Player.h	(revision 4039)
+++ src/game/Player.h	(working copy)
@@ -1198,6 +1198,7 @@
         void UpdateWeaponSkill (WeaponAttackType attType);
         void UpdateCombatSkills(Unit *pVictim, WeaponAttackType attType, MeleeHitOutcome outcome, bool defence);
         uint32 m_extraAttacks;
+        uint32 m_extraAttacksTime;
 
         void SetSkill(uint32 id, uint16 currVal, uint16 maxVal);
         uint16 GetMaxSkillValue(uint32 skill) const;
Index: src/game/Unit.cpp
===================================================================
--- src/game/Unit.cpp	(revision 4039)
+++ src/game/Unit.cpp	(working copy)
@@ -2494,7 +2494,13 @@
                         case 33891: if(i_spellId==5420 || i_spellId==34123) is_triggered_by_spell = true; break;
                     }
                     break;
-            }
+
+                case SPELL_AURA_MOD_ATTACK_POWER:
+                    switch(spellId)
+                    {
+                        case 32910: if(i_spellId==33727 || i_spellId==33754 || i_spellId==33755 || i_spellId==33756 || i_spellId==33757) is_triggered_by_spell = true; break;
+                    }
+           }
         }
 
         if(!is_triggered_by_spell)
@@ -3777,7 +3783,29 @@
             CastSpell(pVictim, &igniteDot, true, NULL, triggredByAura);
             return;
         }
+        //windfury weapon dummy aura effect 20% chance
+        case 33727:
+        case 33754:
+        case 33755:
+        case 33756:
+        case 33757:
+        {
+            sLog.outDebug("Tempo mem%u",((Player*)pVictim)->m_extraAttacksTime);
+            sLog.outDebug("Tempo %u",time(NULL));
+    
+            if( time(NULL) - ((Player*)pVictim)->m_extraAttacksTime < 3 )
+                return;
 
+            ((Player*)pVictim)->m_extraAttacksTime = time(NULL);
+
+            SpellEntry const *windfuryAttackTemplate = sSpellStore.LookupEntry(32910);
+            SpellEntry windfuryAttack = *windfuryAttackTemplate;
+ 
+            windfuryAttack.EffectBasePoints[0] = dummySpell->EffectBasePoints[0];
+            windfuryAttack.EffectRealPointsPerLevel[0] = 0;
+            CastSpell(pVictim, &windfuryAttack, true, NULL, triggredByAura);
+            return;
+        }
         // Combustion
         case 11129:
             {