diff options
-rw-r--r-- | sql/updates/1912_world.sql (renamed from sql/updates/1910_world.sql) | 6 | ||||
-rw-r--r-- | sql/updates/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/game/Player.cpp | 5 | ||||
-rw-r--r-- | src/game/SpellAuraDefines.h | 2 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 13 | ||||
-rw-r--r-- | src/game/Unit.cpp | 5 |
6 files changed, 12 insertions, 21 deletions
diff --git a/sql/updates/1910_world.sql b/sql/updates/1912_world.sql index 940c152bdd5..267dcf548e9 100644 --- a/sql/updates/1910_world.sql +++ b/sql/updates/1912_world.sql @@ -5,7 +5,7 @@ DELETE FROM `spell_proc_event` WHERE `entry` IN (44745, 54787, 47571, 47572, 537 INSERT INTO `spell_proc_event` VALUES (44745, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00008000, 0x0006000, 0.000000, 0.000000, 0), (54787, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00008000, 0x0006000, 0.000000, 0.000000, 0), -(47571, 0x00, 6, 65536, 0x00000000, 0x00000000, 0x00000000, 0x0006000, 0.000000, 0.000000, 0), -(47572, 0x00, 6, 59981, 0x00000000, 0x00000000, 0x00000000, 0x0006000, 0.000000, 0.000000, 0), +(47571, 0x00, 6, 65536, 0x00000000, 0x00000000, 65536, 0x0006000, 0.000000, 0.000000, 0), +(47572, 0x00, 6, 59981, 0x00000000, 0x00000000, 65536, 0x0006000, 0.000000, 0.000000, 0), (53754, 0x00, 5, 0x00000000, 1024, 0x00000000, 0x00000000, 0x0006000, 0.000000, 0.000000, 0), -(53759, 0x00, 5, 0x00000000, 1024, 0x00000000, 0x00000000, 0x0006000, 0.000000, 0.000000, 0);
\ No newline at end of file +(53759, 0x00, 5, 0x00000000, 1024, 0x00000000, 0x00000000, 0x0006000, 0.000000, 0.000000, 0); diff --git a/sql/updates/CMakeLists.txt b/sql/updates/CMakeLists.txt index 833a80fc083..0dff617efb2 100644 --- a/sql/updates/CMakeLists.txt +++ b/sql/updates/CMakeLists.txt @@ -81,7 +81,7 @@ INSTALL(FILES 1877_mangos_7439_01_world_trinity_string.sql 1884_world.sql 1886_world.sql -1910_world.sql 1911_world.sql +1912_world.sql 1927_world.sql DESTINATION share/trinity/sql/updates)
\ No newline at end of file diff --git a/src/game/Player.cpp b/src/game/Player.cpp index b45527b9401..a7828439383 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -19282,9 +19282,10 @@ void Player::SendAurasForTarget(Unit *target) // charges data << uint8(aura->GetAuraCharges()); - if(!(itr->second.m_Flags & AFLAG_NOT_CASTER)) + if(!(itr->second.m_Flags & AFLAG_CASTER)) { - data << uint8(0); // packed GUID of someone (caster?) + if (Unit * caster = aura->GetCaster()) + data.append(caster->GetPackGUID()); } if(itr->second.m_Flags & AFLAG_DURATION) // include aura duration diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h index 2bea07d9a9b..9fdf622633f 100644 --- a/src/game/SpellAuraDefines.h +++ b/src/game/SpellAuraDefines.h @@ -28,7 +28,7 @@ enum AURA_FLAGS AFLAG_EFF_INDEX_0 = 0x01, AFLAG_EFF_INDEX_1 = 0x02, AFLAG_EFF_INDEX_2 = 0x04, - AFLAG_NOT_CASTER = 0x08, + AFLAG_CASTER = 0x08, AFLAG_POSITIVE = 0x10, AFLAG_DURATION = 0x20, AFLAG_UNK2 = 0x40, diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index b4bedebbfe9..c0cf9d17b0e 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -846,7 +846,7 @@ void Aura::_AddAura() assert(slot < MAX_AURAS); // assert that we find a slot and it is valid AuraSlotEntry t_entry; - t_entry.m_Flags=(IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE); + t_entry.m_Flags=(IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE) | ((GetCasterGUID() == m_target->GetGUID()) ? AFLAG_CASTER : AFLAG_NONE) | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE); t_entry.m_Level=(caster ? caster->getLevel() : sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL)); t_entry.m_spellId = GetId(); //init pointers-prevent unexpected behaviour @@ -5816,17 +5816,6 @@ void Aura::PeriodicTick() int32 drain_amount = m_target->GetPower(power) > pdamage ? pdamage : m_target->GetPower(power); - //Viper sting and Drain Life take mana % amount from target, but not bigger than amount*2 of caster mana - if ((m_spellProto->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags[0]&0x10) - || (m_spellProto->SpellFamilyName==SPELLFAMILY_HUNTER && m_spellProto->SpellFamilyFlags[1]&0x80)) - { - uint32 drain = m_target->GetMaxPower(power) * drain_amount /100; - if(drain > pCaster->GetMaxPower(power) * drain_amount / 50) - drain_amount = pCaster->GetMaxPower(power) * drain_amount / 50; - else - drain_amount = drain; - } - // resilience reduce mana draining effect at spell crit damage reduction (added in 2.4) if (power == POWER_MANA && m_target->GetTypeId() == TYPEID_PLAYER) drain_amount -= ((Player*)m_target)->GetSpellCritDamageReduction(drain_amount); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 48e7aec78c8..ddd4e12b3fb 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -13418,9 +13418,10 @@ void Unit::SendAuraUpdate(uint8 slot) data << uint8(entry->m_Level); data << uint8(ptr->GetAuraCharges()? ptr->GetAuraCharges() : ptr->GetStackAmount()); - if(!(entry->m_Flags & AFLAG_NOT_CASTER)) + if(!(entry->m_Flags & AFLAG_CASTER)) { - data << uint8(0); // pguid + if (Unit * caster = ptr->GetCaster()) + data.append(caster->GetPackGUID()); } if(entry->m_Flags & AFLAG_DURATION) |