Jump to content

[10236][patch] SPELL_AURA_292


Recommended Posts

Posted

What bug does the patch fix? What features does the patch add?

This patch implements spell Call Stabled Pet (http://www.wowhead.com/?spell=62757)

For which repository revision was the patch created?

[9728]

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

couldnt find any

Who has been writing this patch? Please include either forum user names or email addresses.

me

diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index f5941b8..c12ee24 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -2142,6 +2142,10 @@ Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask)
    if (guid.IsEmpty() || !IsInWorld() || isInFlight())
        return NULL;

+    // needed by Aura 292
+    if (GetGUID() == guid.GetRawValue())
+        return ((Creature*)this);
+
    // exist (we need look pets also for some interaction (quest/etc)
    Creature *unit = GetMap()->GetCreatureOrPetOrVehicle(guid);
    if (!unit)

diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h
index 8184db3..847b160 100644
--- a/src/game/SpellAuraDefines.h
+++ b/src/game/SpellAuraDefines.h
@@ -334,7 +334,7 @@ enum AuraType
    SPELL_AURA_289 = 289,
    SPELL_AURA_MOD_ALL_CRIT_CHANCE = 290,
    SPELL_AURA_MOD_QUEST_XP_PCT = 291,
-    SPELL_AURA_292 = 292,
+    SPELL_AURA_OPEN_STABLE = 292,
    SPELL_AURA_293 = 293,
    SPELL_AURA_294 = 294,
    SPELL_AURA_295 = 295,

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 35362de..660c6b3 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -342,7 +342,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
    &Aura::HandleUnused,                                    //289 unused (3.2.2a)
    &Aura::HandleAuraModAllCritChance,                      //290 SPELL_AURA_MOD_ALL_CRIT_CHANCE
    &Aura::HandleNoImmediateEffect,                         //291 SPELL_AURA_MOD_QUEST_XP_PCT           implemented in Player::GiveXP
-    &Aura::HandleNULL,                                      //292 call stabled pet
+    &Aura::HandleAuraOpenStable,                            //292 call stabled pet
    &Aura::HandleNULL,                                      //293 3 spells
    &Aura::HandleNULL,                                      //294 2 spells, possible prevent mana regen
    &Aura::HandleUnused,                                    //295 unused (3.2.2a)
@@ -8273,3 +8273,17 @@ void Aura::HandleAllowOnlyAbility(bool apply, bool Real)
    m_target->UpdateDamagePhysical(RANGED_ATTACK);
    m_target->UpdateDamagePhysical(OFF_ATTACK);
}
+
+void Aura::HandleAuraOpenStable(bool apply, bool Real)
+{
+    if(!apply || !Real)
+        return;
+
+    Unit* caster = GetCaster();
+    if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
+        return;
+
+    WorldPacket data;
+    data << uint64(caster->GetGUID());
+    ((Player*)caster)->GetSession()->HandleListStabledPetsOpcode(data);
+}

diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h
index fa7d86d..b229cad 100644
--- a/src/game/SpellAuras.h
+++ b/src/game/SpellAuras.h
@@ -221,6 +221,7 @@ class MANGOS_DLL_SPEC Aura
        void HandleModTargetArmorPct(bool Apply, bool Real);
        void HandleAuraModAllCritChance(bool Apply, bool Real);
        void HandleAllowOnlyAbility(bool Apply, bool Real);
+        void HandleAuraOpenStable(bool apply, bool Real);

        virtual ~Aura();


Posted
The comments for Call Stabled Pet say that its cooldown is reset whenever you change specs - should add that functionality to your patch, or make a note and wait for dual spec?

I am working with master branch only, without any additional patches, but I think that if changing spec must reset cooldown, then it must be done somewhere in dual spec patch, not in this patch.

  • 2 weeks later...
  • 2 weeks later...
Posted

//=====================================================

*** Hardware ***

Processor: Pentium® Dual-Core CPU E5200 @ 2.50GHz

Number Of Processors: 2

Physical Memory: 3397768 KB (Available: 1634748 KB)

Commit Charge Limit: 4194303 KB

*** Operation System ***

Microsoft Windows Server 2003 Enterprise Edition Service Pack 2 (Version 5.2, Build 3790)

//=====================================================

Exception code: C0000005 ACCESS_VIOLATION

Fault address: 005188B2 01:001178B2 D:\\mangos\\mangosd.exe

Registers:

EAX:0001D63E

EBX:6F20F6C8

ECX:00000000

EDX:00000000

ESI:00000000

EDI:008FB6E0

CS:EIP:001B:005188B2

SS:ESP:0023:0C3BCD08 EBP:0C3C2D78

DS:0023 ES:0023 FS:003B GS:0000

Flags:00010246

Call stack:

Address Frame Function SourceFile

005188B2 00000000 ?GetNPCIfCanInteractWith@Player@@QAEPAVCreature@@VObjectGuid@@I@Z+42

008196B3 00000000 ?HandleListStabledPetsOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z+73

006FB4FF 00000000 ?HandleAuraOpenStable@Aura@@QAEX_N0@Z+EF

006E1616 00000000 ?ApplyModifier@Aura@@QAEX_N0@Z+66

00491123 00000000 ?AddAura@Unit@@QAE_NPAVAura@@@Z+A03

0054BF08 00000000 ?_LoadAuras@Player@@IAEXPAVQueryResult@@I@Z+468

0054AC44 00000000 ?LoadFromDB@Player@@QAE_NIPAVSqlQueryHolder@@@Z+2B64

008E3D24 00000000 ?HandlePlayerLogin@WorldSession@@QAEXPAVLoginQueryHolder@@@Z+184

008E3B90 00000000 ?HandlePlayerLoginOpcode@WorldSession@@QAEXAAVWorldPacket@@@Z+290

008E810D 00000000 ?HandleEquipmentSetUse@WorldSession@@QAEXAAVWorldPacket@@@Z+75D

008FDCD8 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+33A8

0065AF65 00000000 ??0CreatureEventAI@@QAE@ABV0@@Z+7655

006594BB 00000000 ??0CreatureEventAI@@QAE@ABV0@@Z+5BAB

0045944E 00000000 ?getSource@?$Reference@V?$GridRefManager@VCorpse@@@@VCorpse@@@@QBEPAVCorpse@@XZ+4098E

008FB6F9 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+DC9

002E1B84 00000000 ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74

78543433 00000000 _endthreadex+44

785434C7 00000000 _endthreadex+D8

7C82482F 00000000 GetModuleHandleA+DF

Call stack:

Address Frame Function SourceFile

7C9585EC 00000000 KiFastSystemCallRet+0

7C821C8D 00000000 WaitForSingleObject+12

Call stack:

Address Frame Function SourceFile

7C9585EC 00000000 KiFastSystemCallRet+0

7C8024FD 00000000 Sleep+F

008FB910 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+FE0

00901C20 00000000 ?step@barGoLink@@QAEXXZ+1FF0

008FB6F9 00000000 ?GetFloatDefault@Config@@QAEMPBDM@Z+DC9

002E1B84 00000000 ?invoke@ACE_OS_Thread_Adapter@@UAEKXZ+74

78543433 00000000 _endthreadex+44

785434C7 00000000 _endthreadex+D8

7C82482F 00000000 GetModuleHandleA+DF

AND logfilelevel = 3 server .log

2010-04-21 21:16:17 HP is: 0 MP is: 0

2010-04-21 21:16:17 AGILITY is: 0.000000 STRENGTH is: 0.000000

2010-04-21 21:16:17 INTELLECT is: 0.000000 SPIRIT is: 0.000000

2010-04-21 21:16:17 STAMINA is: 0.000000

2010-04-21 21:16:17 Armor is: 0 Block is: 0.000000

2010-04-21 21:16:17 HolyRes is: 0 FireRes is: 0

2010-04-21 21:16:17 NatureRes is: 0 FrostRes is: 0

2010-04-21 21:16:17 ShadowRes is: 0 ArcaneRes is: 0

2010-04-21 21:16:17 MIN_DAMAGE is: 0.000000 MAX_DAMAGE is: 0.000000

2010-04-21 21:16:17 MIN_OFFHAND_DAMAGE is: 0.000000 MAX_OFFHAND_DAMAGE is: 0.000000

2010-04-21 21:16:17 MIN_RANGED_DAMAGE is: 0.000000 MAX_RANGED_DAMAGE is: 0.000000

2010-04-21 21:16:17 ATTACK_TIME is: 0 RANGE_ATTACK_TIME is: 0

2010-04-21 21:16:17 Aura: construct Spellid : 1494, Aura : 44 Duration : -1 Target : 1 Damage : 1

2010-04-21 21:16:17 Aura 44 now is in use

2010-04-21 21:16:17 Added aura spellid 1494, effect 0

2010-04-21 21:16:17 Aura: construct Spellid : 1494, Aura : 44 Duration : -1 Target : 1 Damage : 1

2010-04-21 21:16:17 Aura 44 now is remove mode 1

2010-04-21 21:16:17 Aura 44 now is in use

2010-04-21 21:16:17 Added aura spellid 1494, effect 0

2010-04-21 21:16:17 Aura: construct Spellid : 1494, Aura : 168 Duration : -1 Target : 1 Damage : 0

2010-04-21 21:16:17 Aura 168 now is in use

2010-04-21 21:16:17 Added aura spellid 1494, effect 1

2010-04-21 21:16:17 Aura: construct Spellid : 62757, Aura : 292 Duration : 120000 Target : 1 Damage : 1

2010-04-21 21:16:17 WORLD: Recv MSG_LIST_STABLED_PETS

2010-04-21 21:16:17 Aura: construct Spellid : 62757, Aura : 292 Duration : 120000 Target : 1 Damage : 1

2010-04-21 21:16:17 WORLD: Recv MSG_LIST_STABLED_PETS

cause crash

Posted

i've got similar crash once per few weeks of using this patch. it was caused by permament addition aura to pet or player (can't remember now). you can get rid of it simply stoping server and removing it from character_aura/pet_aura

  • 2 months later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use