diff options
-rw-r--r-- | sql/updates/3901_world_spell_proc_event.sql | 3 | ||||
-rw-r--r-- | sql/world_spell_full.sql | 1 | ||||
-rw-r--r-- | src/game/Creature.cpp | 2 | ||||
-rw-r--r-- | src/game/Map.cpp | 2 | ||||
-rw-r--r-- | src/game/Player.cpp | 2 | ||||
-rw-r--r-- | src/game/Spell.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 15 | ||||
-rw-r--r-- | src/game/Unit.cpp | 6 |
8 files changed, 19 insertions, 14 deletions
diff --git a/sql/updates/3901_world_spell_proc_event.sql b/sql/updates/3901_world_spell_proc_event.sql new file mode 100644 index 00000000000..4f333311d2d --- /dev/null +++ b/sql/updates/3901_world_spell_proc_event.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN (56249); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(56249, 0x00, 5, 0x00000000, 0x00000000, 0x00000400, 0x00000000, 0x00000000, 0, 0, 0); -- Glyph of Felhunter
\ No newline at end of file diff --git a/sql/world_spell_full.sql b/sql/world_spell_full.sql index 1b29283c6af..b0d025ba1c5 100644 --- a/sql/world_spell_full.sql +++ b/sql/world_spell_full.sql @@ -1432,6 +1432,7 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell (55768, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Darkglow Embroidery (55776, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 45), -- Swordguard Embroidery (56218, 0x00, 5, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Glyph of Corruption +(56249, 0x00, 5, 0x00000000, 0x00000000, 0x00000400, 0x00000000, 0x00000000, 0, 0, 0), -- Glyph of Felhunter (56333, 0x00, 9, 0x00000004, 0x00000000, 0x00000040, 0x00022200, 0x00000000, 0, 0, 0), -- T.N.T. (Rank 1) (56336, 0x00, 9, 0x00000004, 0x00000000, 0x00000040, 0x00022200, 0x00000000, 0, 0, 0), -- T.N.T. (Rank 2) (56337, 0x00, 9, 0x00000004, 0x00000000, 0x00000040, 0x00022200, 0x00000000, 0, 0, 0), -- T.N.T. (Rank 3) diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index e8916aad70a..f31dcbf4df7 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -140,7 +140,7 @@ m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_A m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL), m_creatureInfo(NULL), m_reactState(REACT_AGGRESSIVE), m_formation(NULL), m_summonMask(SUMMON_MASK_NONE) , m_AlreadySearchedAssistance(false) -, m_creatureData(NULL) +, m_creatureData(NULL), m_PlayerDamageReq(0) { m_regenTimer = 200; m_valuesCount = UNIT_END; diff --git a/src/game/Map.cpp b/src/game/Map.cpp index e3da8480719..f3835a851d3 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -616,7 +616,7 @@ void Map::RelocationNotify() void Map::AddUnitToNotify(Unit* u) { - if(u->m_NotifyListPos < 0) + if(u->m_NotifyListPos < 0 && u->IsInWorld()) { u->oldX = u->GetPositionX(); u->oldY = u->GetPositionY(); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 2ffd1a8fb58..5f97ab82e68 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -6502,7 +6502,7 @@ void Player::_ApplyItemMods(Item *item, uint8 slot,bool apply) uint8 attacktype = Player::GetAttackBySlot(slot); //check disarm only on mod apply to allow remove item mods - if (apply && !CanUseAttackType(attacktype) ) + if (!CanUseAttackType(attacktype) ) return; if(attacktype < MAX_ATTACK) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 7f84e3a1cac..9a79b20192e 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1052,7 +1052,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) // Do healing and triggers if (m_healing > 0) { - bool crit = caster->isSpellCrit(NULL, m_spellInfo, m_spellSchoolMask); + bool crit = caster->isSpellCrit(unitTarget, m_spellInfo, m_spellSchoolMask); uint32 addhealth = m_healing; if (crit) { diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 43f004d7701..51c27aabac3 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3907,17 +3907,19 @@ void AuraEffect::HandleAuraModDisarm(bool apply, bool Real, bool /*changeAmount* default: return; } - if(apply) - m_target->SetFlag(field, flag); - else - m_target->RemoveFlag(field, flag); if (m_target->GetTypeId() == TYPEID_PLAYER) { if(Item *pItem = ((Player*)m_target)->GetItemByPos( INVENTORY_SLOT_BAG_0, slot )) ((Player*)m_target)->_ApplyItemMods(pItem, slot, !apply); } - else if (((Creature*)m_target)->GetCurrentEquipmentId()) + + if(apply) + m_target->SetFlag(field, flag); + else + m_target->RemoveFlag(field, flag); + + if (m_target->GetTypeId() == TYPEID_UNIT && ((Creature*)m_target)->GetCurrentEquipmentId()) m_target->UpdateDamagePhysical(attType); } @@ -5418,8 +5420,7 @@ void AuraEffect::HandleModDamageDone(bool apply, bool Real, bool changeAmount) m_target->ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG+i,m_amount,apply); } } - Pet* pet = ((Player*)m_target)->GetPet(); - if(pet) + if(Guardian* pet = ((Player*)m_target)->GetGuardianPet()) pet->UpdateAttackPowerAndDamage(); } } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 016abedf888..b8bcf656b9f 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9233,7 +9233,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM { AuraEffect *aura = pVictim->GetDummyAura(58597); if (aura && aura->GetCasterGUID() == GetGUID()) - crit_chance+=aura->GetAmount(); + crit_chance+=aura->GetAmount(); break; } break; @@ -11684,8 +11684,8 @@ void Unit::AddToWorld() { WorldObject::AddToWorld(); m_Notified = false; - //assert(m_NotifyListPos < 0); instance : crash - m_NotifyListPos = -1; + assert(m_NotifyListPos < 0); //instance : crash + //m_NotifyListPos = -1; SetToNotify(); } } |