From 2e8761f1b0fa714c84a9678bdb7f30db93c14f9d Mon Sep 17 00:00:00 2001 From: Evildead666 Date: Fri, 3 Apr 2015 20:47:25 +0200 Subject: [PATCH 1/3] fix typo --- .../scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/SD2/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/src/modules/SD2/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index 693f161b..f5c22e9f 100644 --- a/src/modules/SD2/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/src/modules/SD2/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -130,7 +130,7 @@ struct boss_thermaplugg : public CreatureScript void Aggro(Unit* /*pWho*/) override { //copy faces GUIDs from instance script; BombFaces are fully controlled by this AI - uint32 faces[MAX_GNOME_FACES] {GO_GNOME_FACE_1, GO_GNOME_FACE_2, GO_GNOME_FACE_3, GO_GNOME_FACE_4, GO_GNOME_FACE_5, GO_GNOME_FACE_6}; + uint32 faces[MAX_GNOME_FACES] = {GO_GNOME_FACE_1, GO_GNOME_FACE_2, GO_GNOME_FACE_3, GO_GNOME_FACE_4, GO_GNOME_FACE_5, GO_GNOME_FACE_6}; for (int i = 0; i < MAX_GNOME_FACES; ++i) { m_asBombFaces[i].m_gnomeFaceGuid = ObjectGuid(m_pInstance->GetData64(faces[i])); From 157c3a1f797db452829b3ecc7295d8b17f3aff57 Mon Sep 17 00:00:00 2001 From: Faded Date: Sun, 3 May 2015 08:22:11 -0700 Subject: [PATCH 2/3] UpdateRealm(zero.sh) ADDED: updateRealm.sql import line --- linux/zero.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/zero.sh b/linux/zero.sh index b8fedf8f..513125f0 100644 --- a/linux/zero.sh +++ b/linux/zero.sh @@ -361,6 +361,7 @@ while [ $choice -eq 3 ]; do cecho "--------------" $bldgreen sleep 1 mysql -u root -p$mysqlpass realmd < /home/mangos/database/Realm/Setup/realmdLoadDB.sql + mysql -u root -p$mysqlpass realmd < /home/mangos/database/Tools/updateRealm.sql cecho "--------------" $bldgreen cecho "Importing characters..." $bldgreen cecho "--------------" $bldgreen @@ -490,4 +491,3 @@ while [ $choice -eq 3 ]; do fi done #END - From 99633ff79169b2561988acfdb70d59104325a5e2 Mon Sep 17 00:00:00 2001 From: Evildead666 Date: Mon, 4 May 2015 16:27:29 +0200 Subject: [PATCH 3/3] fixing beast lore Aura --- src/game/Object/Object.cpp | 18 +++++++++++++++++- src/game/WorldHandlers/SpellAuras.cpp | 14 +++++++++----- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/game/Object/Object.cpp b/src/game/Object/Object.cpp index 703f4311..4ba94722 100644 --- a/src/game/Object/Object.cpp +++ b/src/game/Object/Object.cpp @@ -430,7 +430,7 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, UpdateMask* u else if (index == UNIT_DYNAMIC_FLAGS && GetTypeId() == TYPEID_UNIT) { uint32 send_value = m_uint32Values[index]; - + /* Initiate pointer to creature so we can check loot */ if (Creature* my_creature = (Creature*)this) /* If the creature is NOT fully looted */ @@ -456,6 +456,22 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, UpdateMask* u if (send_value & UNIT_DYNFLAG_TAPPED && is_tapped) { send_value = send_value & ~UNIT_DYNFLAG_TAPPED; } + // Checking SPELL_AURA_EMPATHY and caster + if (send_value & UNIT_DYNFLAG_SPECIALINFO && ((Unit*)this)->IsAlive()) + { + bool bIsEmpathy = false; + bool bIsCaster = false; + Unit::AuraList const& mAuraEmpathy = ((Unit*)this)->GetAurasByType(SPELL_AURA_EMPATHY); + for (Unit::AuraList::const_iterator itr = mAuraEmpathy.begin(); !bIsCaster && itr != mAuraEmpathy.end(); ++itr) + { + bIsEmpathy = true; // Empathy by aura set + if ((*itr)->GetCasterGuid() == target->GetObjectGuid()) + bIsCaster = true; // target is the caster of an empathy aura + } + if (bIsEmpathy && !bIsCaster) // Empathy by aura, but target is not the caster + send_value &= ~UNIT_DYNFLAG_SPECIALINFO; + } + *data << send_value; } else diff --git a/src/game/WorldHandlers/SpellAuras.cpp b/src/game/WorldHandlers/SpellAuras.cpp index 1198f2c1..b126bdae 100644 --- a/src/game/WorldHandlers/SpellAuras.cpp +++ b/src/game/WorldHandlers/SpellAuras.cpp @@ -1507,6 +1507,10 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real) Powers PowerType = POWER_MANA; Unit* target = GetTarget(); + // remove SPELL_AURA_EMPATHY + target->RemoveSpellsCausingAura(SPELL_AURA_EMPATHY); + + switch (form) { case FORM_CAT: @@ -4108,12 +4112,12 @@ void Aura::HandleShapeshiftBoosts(bool apply) void Aura::HandleAuraEmpathy(bool apply, bool /*Real*/) { - if (GetTarget()->GetTypeId() != TYPEID_UNIT) - { return; } + Unit* target = GetTarget(); - CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(GetTarget()->GetEntry()); - if (ci && ci->CreatureType == CREATURE_TYPE_BEAST) - { GetTarget()->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply); } + // This aura is expected to only work with CREATURE_TYPE_BEAST or players + CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(target->GetEntry()); + if (target->GetTypeId() == TYPEID_PLAYER || (target->GetTypeId() == TYPEID_UNIT && ci && ci->CreatureType == CREATURE_TYPE_BEAST)) + target->ApplyModUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_SPECIALINFO, apply); } void Aura::HandleAuraUntrackable(bool apply, bool /*Real*/)