Jump to content

Thyros

Members
  • Posts

    193
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by Thyros

  1. that works fine:

    @@ -694,11 +694,11 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
                Creature *cVictim = (Creature*)pVictim;
    
                if(!cVictim->isPet())
                {
                    cVictim->DeleteThreatList();
    -                if (cVictim->GetCreatureInfo()->lootid)
    +                if (cVictim->GetCreatureInfo()->lootid || cVictim->GetCreatureInfo()->maxgold > 0)
                        cVictim->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
                }
                // Call creature just died function
                if (cVictim->AI())
                    cVictim->AI()->JustDied(this);

  2. Ambal maybe this test results aren't very objective....I need to say this patch has good influence on my server.

    I'm using:

    - Rev 8195

    - OpenMP

    - Interfaction <- what is this?

    - Some custom code <- and this?

    - your Gridsearch

    Well I am testing this patch with 90Yards and 16 cells in griddefines. I have to say this is working very nice! I have not that big server. 100 testers per day. But it has an uptime of 6 days now!! Sometime I have a lag-spike but thats not because of your patch. Unfortunately I had it before.

    The cpu-usage is very stable. just between 20-25%!

    So thanks for your work. You are on the roll! ;)

    can you me say what is interfaction?

  3. Compile error, sry is german:

    8>------ Erstellen gestartet: Projekt: realmd, Konfiguration: Release Win32 ------

    9>------ Erstellen gestartet: Projekt: game, Konfiguration: Release Win32 ------

    8>Kompilieren...

    9>Kompilieren...

    8>WheatyExceptionReport.cpp

    9>pchdef.cpp

    8>RealmList.cpp

    8>Main.cpp

    8>AuthSocket.cpp

    8>AccountHandler.cpp

    8>Ressourcen werden kompiliert...

    8>Microsoft ® Windows ® Resource Compiler Version 6.1.6723.1

    8>Copyright © Microsoft Corporation. All rights reserved.

    8>Verknüpfen...

    8> Bibliothek "..\\..\\bin\\Win32_Release\\realmd.lib" und Objekt "..\\..\\bin\\Win32_Release\\realmd.exp" werden erstellt.

    8>Das Manifest wird eingebettet...

    8>Postbuildereignis wird ausgeführt...

    8> 1 Datei(en) kopiert.

    8>Das Buildprotokoll wurde unter "file://d:\\SVN-Checkout\\mangos\\win\\VC90\\realmd__Win32_Release\\BuildLog.htm" gespeichert.

    8>realmd - 0 Fehler, 0 Warnung(en)

    9>Kompilieren...

    9>AccountMgr.cpp

    9>ChatLog.cpp

    9>ChatLexicsCutter.cpp

    9>ChatHandler.cpp

    9>Chat.cpp

    9>BattleGroundWS.cpp

    9>BattleGroundSA.cpp

    9>BattleGroundRV.cpp

    9>BattleGroundRL.cpp

    9>BattleGroundNA.cpp

    9>BattleGroundMgr.cpp

    9>BattleGroundHandler.cpp

    9>BattleGroundEY.cpp

    9>BattleGroundDS.cpp

    9>BattleGroundBE.cpp

    9>BattleGroundAV.cpp

    9>BattleGroundAB.cpp

    9>BattleGroundAA.cpp

    9>BattleGround.cpp

    9>OutdoorPvPZM.cpp

    9>OutdoorPvPTF.cpp

    9>OutdoorPvPSI.cpp

    9>OutdoorPvPObjectiveAI.cpp

    9>OutdoorPvPNA.cpp

    9>OutdoorPvPMgr.cpp

    9>OutdoorPvPLA.cpp

    9>OutdoorPvPHP.cpp

    9>OutdoorPvPEP.cpp

    9>OutdoorPvP.cpp

    9>AuctionHouseMgr.cpp

    9>AuctionHouseHandler.cpp

    9>AuctionHouseBot.cpp

    9>ThreatManager.cpp

    9>HostilRefManager.cpp

    9>GroupReference.cpp

    9>FollowerReference.cpp

    9>PlayerDump.cpp

    9>Level3.cpp

    9>Level2.cpp

    9>Level1.cpp

    9>Level0.cpp

    9>debugcmds.cpp

    9>WorldSocketMgr.cpp

    9>WorldSocket.cpp

    9>WorldSession.cpp

    9>WorldLog.cpp

    9>Opcodes.cpp

    9>GlobalEvents.cpp

    9>DBCStores.cpp

    9>WaypointMovementGenerator.cpp

    9>Vehicle.cpp

    9>Unit.cpp

    9>TotemAI.cpp

    9>Totem.cpp

    9>TemporarySummon.cpp

    9>TargetedMovementGenerator.cpp

    9>StatSystem.cpp

    9>SpellMgr.cpp

    9>SocialMgr.cpp

    9>ReputationMgr.cpp

    9>ReactorAI.cpp

    9>RandomMovementGenerator.cpp

    9>PointMovementGenerator.cpp

    9>Player.cpp

    9>PetAI.cpp

    9>..\\..\\src\\game\\Player.cpp(17490) : error C3861: "SendAurasForTarget": Bezeichner wurde nicht gefunden.

    9>Pet.cpp

    9>..\\..\\src\\game\\Player.cpp(18564) : error C3861: "SendAurasForTarget": Bezeichner wurde nicht gefunden.

    9>..\\..\\src\\game\\Player.cpp(18578) : error C2995: "void UpdateVisibilityOf_helper(std::set<_Kty> &,T *)": Funktionsvorlage wurde bereits definiert.

    9> with

    9> [

    9> _Kty=uint64

    9> ]

    9> ..\\..\\src\\game\\Player.cpp(18520): Siehe Deklaration von 'UpdateVisibilityOf_helper'

    9>..\\..\\src\\game\\Player.cpp(18585) : error C2766: Explizite Spezialisierung; "void UpdateVisibilityOf_helper<GameObject>(std::set<_Kty> &,GameObject *)" wurde bereits definiert.

    9> with

    9> [

    9> _Kty=uint64

    9> ]

    9> ..\\..\\src\\game\\Player.cpp(18526): Siehe vorherige Definition von 'UpdateVisibilityOf_helper'

    9>..\\..\\src\\game\\Player.cpp(18618) : error C2244: 'Player::UpdateVisibilityOf': Keine Übereinstimmung für Funktionsdefinition mit vorhandener Deklaration gefunden

    9> Definition

    9> 'void Player::UpdateVisibilityOf(T *,UpdateData &,UpdateDataMapType &,std::set<_Kty> &)'

    9> with

    9> [

    9> _Kty=WorldObject *

    9> ]

    9> Vorhandene Deklarationen

    9> 'void Player::UpdateVisibilityOf(T *,UpdateData &,std::set<_Kty> &)'

    9> with

    9> [

    9> _Kty=Unit *

    9> ]

    9> 'void Player::UpdateVisibilityOf(WorldObject *)'

    9>..\\..\\src\\game\\Player.cpp(19038) : error C2039: 'SendAurasForTarget': Ist kein Element von 'Player'

    9> d:\\svn-checkout\\mangos\\src\\game\\Player.h(961): Siehe Deklaration von 'Player'

    9>..\\..\\src\\game\\Player.cpp(19085) : error C2227: Links von "->SendPacket" muss sich ein Zeiger auf Klassen-/Struktur-/Union-/generischen Typ befinden.

    9> Typ ist ''unknown-type''

    9>..\\..\\src\\game\\Player.cpp(19085) : error C3861: "GetSession": Bezeichner wurde nicht gefunden.

    9>ObjectPosSelector.cpp

    9>ObjectMgr.cpp

    9>ObjectAccessor.cpp

    9>Object.cpp

    9>NullCreatureAI.cpp

    9>MovementGenerator.cpp

    9>MotionMaster.cpp

    9>LootMgr.cpp

    9>ItemEnchantmentMgr.cpp

    9>Item.cpp

    9>IdleMovementGenerator.cpp

    9>HomeMovementGenerator.cpp

    9>Guild.cpp

    9>GuardAI.cpp

    9>GMTicketMgr.cpp

    9>GameObject.cpp

    9>FleeingMovementGenerator.cpp

    9>DynamicObject.cpp

    9>DestinationHolder.cpp

    9>CreatureEventAIMgr.cpp

    9>CreatureEventAI.cpp

    9>CreatureAISelector.cpp

    9>CreatureAIRegistry.cpp

    9>CreatureAI.cpp

    9>Creature.cpp

    9>Corpse.cpp

    9>ConfusedMovementGenerator.cpp

    9>Calendar.cpp

    9>Bag.cpp

    9>ArenaTeam.cpp

    9>AggressorAI.cpp

    9>World.cpp

    9>Weather.cpp

    9>WaypointManager.cpp

    9>VoiceChatHandler.cpp

    9>UpdateData.cpp

    9>Transports.cpp

    9>TradeHandler.cpp

    9>TaxiHandler.cpp

    9>SpellHandler.cpp

    9>SpellEffects.cpp

    9>SpellAuras.cpp

    9>Spell.cpp

    9>d:\\svn-checkout\\mangos\\src\\game\\spelleffects.cpp(4303) : warning C4700: Die nicht initialisierte lokale Variable "apply" wurde verwendet.

    9>SkillHandler.cpp

    9>SkillExtraItems.cpp

    9>SkillDiscovery.cpp

    9>ScriptCalls.cpp

    9>QuestHandler.cpp

    9>QuestDef.cpp

    9>QueryHandler.cpp

    9>PoolHandler.cpp

    9>PetitionsHandler.cpp

    9>PetHandler.cpp

    9>ObjectGridLoader.cpp

    9>NPCHandler.cpp

    9>MovementHandler.cpp

    9>MiscHandler.cpp

    9>MapManager.cpp

    9>MapInstanced.cpp

    9>Map.cpp

    9>..\\..\\src\\game\\Map.cpp(2684) : error C2509: 'InitVisibilityDistance': Memberfunktion wurde in 'BattleGroundMap' nicht deklariert

    9> d:\\svn-checkout\\mangos\\src\\game\\Map.h(582): Siehe Deklaration von 'BattleGroundMap'

    9>..\\..\\src\\game\\Map.cpp(2690) : error C2509: 'InitializeNotifyTimers': Memberfunktion wurde in 'BattleGroundMap' nicht deklariert

    9> d:\\svn-checkout\\mangos\\src\\game\\Map.h(582): Siehe Deklaration von 'BattleGroundMap'

    9>Mail.cpp

    9>LootHandler.cpp

    9>LFGHandler.cpp

    9>ItemHandler.cpp

    9>InstanceSaveMgr.cpp

    9>InstanceData.cpp

    9>GuildHandler.cpp

    9>GroupHandler.cpp

    9>Group.cpp

    9>GridStates.cpp

    9>GridNotifiers.cpp

    9>..\\..\\src\\game\\GridNotifiers.cpp(90) : error C2065: 'i_clientGUIDs': nichtdeklarierter Bezeichner

    9>..\\..\\src\\game\\GridNotifiers.cpp(90) : error C2228: Links von ".find" muss sich eine Klasse/Struktur/Union befinden.

    9> Typ ist ''unknown-type''

    9>..\\..\\src\\game\\GridNotifiers.cpp(90) : error C2065: 'i_clientGUIDs': nichtdeklarierter Bezeichner

    9>..\\..\\src\\game\\GridNotifiers.cpp(90) : error C2228: Links von ".end" muss sich eine Klasse/Struktur/Union befinden.

    9> Typ ist ''unknown-type''

    9>..\\..\\src\\game\\GridNotifiers.cpp(93) : error C2065: 'i_data_updates': nichtdeklarierter Bezeichner

    9>..\\..\\src\\game\\GridNotifiers.cpp(94) : error C2065: 'i_clientGUIDs': nichtdeklarierter Bezeichner

    9>..\\..\\src\\game\\GridNotifiers.cpp(94) : error C2228: Links von ".erase" muss sich eine Klasse/Struktur/Union befinden.

    9> Typ ist ''unknown-type''

    9>..\\..\\src\\game\\GridNotifiers.cpp(100) : error C2065: 'i_clientGUIDs': nichtdeklarierter Bezeichner

    9>..\\..\\src\\game\\GridNotifiers.cpp(101) : error C2065: 'i_clientGUIDs': nichtdeklarierter Bezeichner

    9>..\\..\\src\\game\\GridNotifiers.cpp(101) : error C2228: Links von ".begin" muss sich eine Klasse/Struktur/Union befinden.

    9> Typ ist ''unknown-type''

    9>..\\..\\src\\game\\GridNotifiers.cpp(101) : error C2065: 'i_clientGUIDs': nichtdeklarierter Bezeichner

    9>..\\..\\src\\game\\GridNotifiers.cpp(101) : error C2228: Links von ".end" muss sich eine Klasse/Struktur/Union befinden.

    9> Typ ist ''unknown-type''

    9>..\\..\\src\\game\\GridNotifiers.cpp(112) : error C2065: 'i_data_updates': nichtdeklarierter Bezeichner

    9>..\\..\\src\\game\\GridNotifiers.cpp(112) : error C2228: Links von ".begin" muss sich eine Klasse/Struktur/Union befinden.

    9> Typ ist ''unknown-type''

    9>..\\..\\src\\game\\GridNotifiers.cpp(112) : error C2065: 'i_data_updates': nichtdeklarierter Bezeichner

    9>..\\..\\src\\game\\GridNotifiers.cpp(112) : error C2228: Links von ".end" muss sich eine Klasse/Struktur/Union befinden.

    9> Typ ist ''unknown-type''

    9>..\\..\\src\\game\\GridNotifiers.cpp(145) : error C2440: 'Initialisierung': 'std::_Tree<_Traits>::iterator' kann nicht in 'std::_Tree<_Traits>::const_iterator' konvertiert werden

    9> with

    9> [

    9> _Traits=std::_Tset_traits<Unit *,std::less<Unit *>,std::allocator<Unit *>,false>

    9> ]

    9> and

    9> [

    9> _Traits=std::_Tset_traits<WorldObject *,std::less<WorldObject *>,std::allocator<WorldObject *>,false>

    9> ]

    9> Quelltyp konnte von keinem Konstruktor angenommen werden, oder die Überladungsauflösung des Konstruktors ist mehrdeutig

    9>..\\..\\src\\game\\GridNotifiers.cpp(145) : error C2678: Binärer Operator '!=': Es konnte kein Operator gefunden werden, der einen linksseitigen Operanden vom Typ 'std::_Tree<_Traits>::const_iterator' akzeptiert (oder keine geeignete Konvertierung möglich)

    9> with

    9> [

    9> _Traits=std::_Tset_traits<WorldObject *,std::less<WorldObject *>,std::allocator<WorldObject *>,false>

    9> ]

    9> C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\include\\guiddef.h(197): kann 'int operator !=(const GUID &,const GUID &)' sein

    9> d:\\SVN-Checkout\\mangos\\dep\\ACE_wrappers\\ace/Time_Value.h(304): oder "bool operator !=(const ACE_Time_Value &,const ACE_Time_Value &)"

    9> C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\include\\xtree(314): oder "bool std::_Tree<_Traits>::const_iterator::operator !=(const std::_Tree<_Traits>::const_iterator &) const"

    9> with

    9> [

    9> _Traits=std::_Tset_traits<WorldObject *,std::less<WorldObject *>,std::allocator<WorldObject *>,false>

    9> ]

    9> bei Anpassung der Argumentliste '(std::_Tree<_Traits>::const_iterator, std::_Tree<_Traits>::iterator)'

    9> with

    9> [

    9> _Traits=std::_Tset_traits<WorldObject *,std::less<WorldObject *>,std::allocator<WorldObject *>,false>

    9> ]

    9> and

    9> [

    9> _Traits=std::_Tset_traits<Unit *,std::less<Unit *>,std::allocator<Unit *>,false>

    9> ]

    9>..\\..\\src\\game\\GridNotifiers.cpp(150) : error C2039: 'SendAurasForTarget': Ist kein Element von 'Player'

    9> d:\\svn-checkout\\mangos\\src\\game\\Player.h(961): Siehe Deklaration von 'Player'

    9>GossipDef.cpp

    9>GMTicketHandler.cpp

    9>GameEventMgr.cpp

    9>DuelHandler.cpp

    9>CombatHandler.cpp

    9>CharacterHandler.cpp

    9>ChannelMgr.cpp

    9>ChannelHandler.cpp

    9>Channel.cpp

    9>CalendarHandler.cpp

    9>ArenaTeamHandler.cpp

    9>AchievementMgr.cpp

    9>Das Buildprotokoll wurde unter "file://d:\\SVN-Checkout\\mangos\\win\\VC90\\game__Win32_Release\\BuildLog.htm" gespeichert.

    9>game - 29 Fehler, 1 Warnung(en)

    10>------ Erstellen gestartet: Projekt: mangosd, Konfiguration: Release Win32 ------

    10>Kompilieren...

    10>WorldRunnable.cpp

    10>WheatyExceptionReport.cpp

    10>RASocket.cpp

    10>Master.cpp

    10>Main.cpp

    10>CliRunnable.cpp

    10>Ressourcen werden kompiliert...

    10>Microsoft ® Windows ® Resource Compiler Version 6.1.6723.1

    10>Copyright © Microsoft Corporation. All rights reserved.

    10>Verknüpfen...

    10>LINK : fatal error LNK1181: Eingabedatei ".\\game__win32_release\\game.lib" kann nicht geöffnet werden.

    10>Das Buildprotokoll wurde unter "file://d:\\SVN-Checkout\\mangos\\win\\VC90\\mangosd__Win32_Release\\BuildLog.htm" gespeichert.

    10>mangosd - 1 Fehler, 0 Warnung(en)

    CODE]

  4. Hello Community, i have ported the mirror image code from infinitycore to mangos, works not right, can anyone test this please, and me help to complete this?

    So the mage mirror images

    only irritating but brilliant

    the mirror must makes 3 duplicates of the Player, taht works not right, and i need help to fix this spell.

    here from Infinitycore: http://bitbucket.org/kane/infinitycore/changeset/ce5fde00e028/

    and here from Trinitycore2: http://dev.trinitycore.org/trinitycore2/changeset/aaf54c52f352/

    Original Author is QAston and Drahy.

    commit 17dd1b73d9d89d4c87263edf6c3d941507b3a71d
    Author: Thyros <Thyros@.(none)>
    Date:   Fri Jul 24 18:24:01 2009 +0200
    
       - Mirror Image.
    
    diff --git a/sql/uecore-fixes/Revision 213/213_mirror_image.sql b/sql/uecore-fixes/Revision 213/213_mirror_image.sql
    new file mode 100644
    index 0000000..07baab9
    --- /dev/null
    +++ b/sql/uecore-fixes/Revision 213/213_mirror_image.sql    
    @@ -0,0 +1,5 @@
    +DELETE FROM `spell_script_target` WHERE `entry` IN (58836);
    +INSERT INTO `spell_script_target` VALUES
    (58836, 1, 31216);
    +
    +UPDATE `creature_template` SET `ScriptName`='npc_mirror_image' WHERE `entry`=31216;
    +UPDATE `creature_template` SET `spell1`=59638, `spell2` = 59637 WHERE `entry`=31216
    diff --git a/src/game/Opcodes.cpp b/src/game/Opcodes.cpp
    index 6309378..31bd98d 100644
    --- a/src/game/Opcodes.cpp
    +++ b/src/game/Opcodes.cpp
    @@ -1051,7 +1051,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
        /*0x3FE*/ { "MSG_GUILD_BANK_MONEY_WITHDRAWN",               STATUS_LOGGEDIN, &WorldSession::HandleGuildBankMoneyWithdrawn   },
        /*0x3FF*/ { "MSG_GUILD_EVENT_LOG_QUERY",                    STATUS_LOGGEDIN, &WorldSession::HandleGuildEventLogQueryOpcode  },
        /*0x400*/ { "CMSG_MAELSTROM_RENAME_GUILD",                  STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    -    /*0x401*/ { "CMSG_GET_MIRRORIMAGE_DATA",                    STATUS_NEVER,    &WorldSession::Handle_NULL                     },
    +    /*0x401*/ { "CMSG_GET_MIRRORIMAGE_DATA",                    STATUS_NEVER,    &WorldSession::HandleMirrrorImageDataRequest   },
        /*0x402*/ { "SMSG_MIRRORIMAGE_DATA",                        STATUS_NEVER,    &WorldSession::Handle_ServerSide               },
        /*0x403*/ { "SMSG_FORCE_DISPLAY_UPDATE",                    STATUS_NEVER,    &WorldSession::Handle_ServerSide               },
        /*0x404*/ { "SMSG_SPELL_CHANCE_RESIST_PUSHBACK",            STATUS_NEVER,    &WorldSession::Handle_ServerSide               },
    diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h
    index 1641796..05f9158 100644
    --- a/src/game/SpellAuraDefines.h
    +++ b/src/game/SpellAuraDefines.h
    @@ -289,7 +289,7 @@ enum AuraType
        SPELL_AURA_COMPREHEND_LANGUAGE = 244,
        SPELL_AURA_MOD_DURATION_OF_MAGIC_EFFECTS = 245,
        SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL = 246,
    -    SPELL_AURA_247 = 247,
    +    SPELL_AURA_CLONE_CASTER = 247,
        SPELL_AURA_MOD_COMBAT_RESULT_CHANCE = 248,
        SPELL_AURA_CONVERT_RUNE = 249,
        SPELL_AURA_MOD_INCREASE_HEALTH_2 = 250,
    @@ -321,7 +321,7 @@ enum AuraType
        SPELL_AURA_276 = 276,                                   // Only "Test Mod Damage % Mechanic" spell, possible mod damage done
        SPELL_AURA_MOD_MAX_AFFECTED_TARGETS = 277,
        SPELL_AURA_MOD_DISARM_RANGED = 278,
    -    SPELL_AURA_279 = 279,
    +    SPELL_AURA_INITIALIZE_IMAGES = 279,
        SPELL_AURA_MOD_ARMOR_PENETRATION_PCT = 280,
        SPELL_AURA_MOD_HONOR_GAIN = 281,
        SPELL_AURA_MOD_BASE_HEALTH_PCT = 282,
    diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
    index 50ffcf9..77bb76b 100644
    --- a/src/game/SpellAuras.cpp
    +++ b/src/game/SpellAuras.cpp
    @@ -299,7 +299,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
        &Aura::HandleComprehendLanguage,                        //244 Comprehend language
        &Aura::HandleNULL,                                      //245 SPELL_AURA_MOD_DURATION_OF_MAGIC_EFFECTS
        &Aura::HandleNoImmediateEffect,                         //246 SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL
    -    &Aura::HandleNULL,                                      //247 target to become a clone of the caster
    +    &Aura::HandleAuraCloneCaster,                           //247 SPELL_AURA_CLONE_CASTER
        &Aura::HandleNoImmediateEffect,                         //248 SPELL_AURA_MOD_COMBAT_RESULT_CHANCE         implemented in Unit::RollMeleeOutcomeAgainst
        &Aura::HandleAuraConvertRune,                           //249 SPELL_AURA_CONVERT_RUNE
        &Aura::HandleAuraModIncreaseHealth,                     //250 SPELL_AURA_MOD_INCREASE_HEALTH_2
    @@ -331,7 +331,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
        &Aura::HandleNULL,                                      //276 mod damage % mechanic?
        &Aura::HandleNoImmediateEffect,                         //277 SPELL_AURA_MOD_MAX_AFFECTED_TARGETS Use SpellClassMask for spell select
        &Aura::HandleNULL,                                      //278 SPELL_AURA_MOD_DISARM_RANGED disarm ranged weapon
    -    &Aura::HandleNULL,                                      //279 visual effects? 58836 and 57507
    +    &Aura::HandleAuraInitializeImages,                      //279 SPELL_AURA_INITIALIZE_IMAGES
        &Aura::HandleModArmorPenetrationPct,                    //280 SPELL_AURA_MOD_ARMOR_PENETRATION_PCT
        &Aura::HandleNULL,                                      //281 SPELL_AURA_MOD_HONOR_GAIN
        &Aura::HandleAuraIncreaseBaseHealthPercent,             //282 SPELL_AURA_INCREASE_BASE_HEALTH_PERCENT
    @@ -7999,3 +7999,42 @@ bool Aura::IsCritFromAbilityAura(Unit* caster, uint32& damage)
        }
        return false;
    }
    +
    +void Aura::HandleAuraInitializeImages(bool Apply, bool Real)
    +{
    +    if (!Real || !Apply)
    +        return;
    +
    +    Unit* caster = GetCaster();
    +    if (!caster)
    +        return;
    +
    +    // Set item visual
    +    if (caster->GetTypeId()== TYPEID_PLAYER)
    +    {
    +        if (Item const* item = ((Player *)caster)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
    +            m_target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, item->GetProto()->ItemId);
    +        if (Item const* item = ((Player *)caster)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
    +            m_target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, item->GetProto()->ItemId);
    +    }
    +    else
    +    {
    +        m_target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, caster->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID));
    +        m_target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, caster->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1));
    +        m_target->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, caster->GetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2));
    +    }
    +}
    +
    +void Aura::HandleAuraCloneCaster(bool Apply, bool Real)
    +{
    +    if (!Real || !Apply)
    +        return;
    +
    +    Unit * caster = GetCaster();
    +    if (!caster)
    +        return;
    +
    +    // Set item visual
    +    m_target->SetDisplayId(caster->GetDisplayId());
    +    m_target->SetUInt32Value(UNIT_FIELD_FLAGS_2, 2064);
    +}
    \\ No newline at end of file
    diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h
    index 061373f..6382570 100644
    --- a/src/game/SpellAuras.h
    +++ b/src/game/SpellAuras.h
    @@ -57,18 +57,9 @@ class MANGOS_DLL_SPEC Aura
    
        public:
            //aura handlers
    -        void HandleNULL(bool, bool)
    -        {
    -            // NOT IMPLEMENTED
    -        }
    -        void HandleUnused(bool, bool)
    -        {
    -            // NOT USED BY ANY SPELL OR USELESS
    -        }
    -        void HandleNoImmediateEffect(bool, bool)
    -        {
    -            // aura not have immediate effect at add/remove and handled by ID in other code place
    -        }
    +        void HandleNULL(bool, bool) { /* Not implemented. */ }
    +        void HandleUnused(bool, bool) { /* Not used or useless. */ }
    +        void HandleNoImmediateEffect(bool, bool) { /* Aura does not have immediate effect at add/remove and handled by ID in other place. */ }
            void HandleBindSight(bool Apply, bool Real);
            void HandleModPossess(bool Apply, bool Real);
            void HandlePeriodicDamage(bool Apply, bool Real);
    @@ -213,6 +204,8 @@ class MANGOS_DLL_SPEC Aura
            void HandleNoReagentUseAura(bool Apply, bool Real);
            void HandlePhase(bool Apply, bool Real);
            void HandleAllowOnlyAbility(bool Apply, bool Real);
    +        void HandleAuraInitializeImages(bool Apply, bool Real);
    +        void HandleAuraCloneCaster(bool Apply, bool Real);
    
            virtual ~Aura();
    
    diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp
    index 82c6123..7e7167e 100644
    --- a/src/game/SpellHandler.cpp
    +++ b/src/game/SpellHandler.cpp
    @@ -612,3 +612,82 @@ void WorldSession::HandleSpellClick( WorldPacket & recv_data )
            }
        }
    }
    +
    +void WorldSession::HandleMirrrorImageDataRequest( WorldPacket & recv_data )
    +{
    +    sLog.outDebug("WORLD: CMSG_GET_MIRRORIMAGE_DATA");
    +    CHECK_PACKET_SIZE(recv_data, 8);
    +    uint64 guid;
    +    recv_data >> guid;
    +
    +    // Get unit for which data is needed by client
    +    Unit *unit = ObjectAccessor::GetObjectInWorld(guid, (Unit*)NULL);
    +    if (!unit)
    +        return;
    +
    +    // Get creator of the unit
    +    Unit *creator = ObjectAccessor::GetObjectInWorld(unit->GetCreatorGUID(), (Unit*)NULL);
    +    if (!creator)
    +        return;
    +
    +    WorldPacket data(SMSG_MIRRORIMAGE_DATA, 68);
    +    data << (uint64)guid;
    +    data << (uint32)creator->GetDisplayId();
    +    if (creator->GetTypeId() == TYPEID_PLAYER)
    +    {
    +        Player* pCreator = (Player *)creator;
    +        data << (uint8)pCreator->getRace();                         // race
    +        data << (uint8)pCreator->getGender();                       // gender
    +        data << (uint8)pCreator->getClass();                        // class
    +        data << (uint8)pCreator->GetByteValue(PLAYER_BYTES, 0);     // skin
    +        data << (uint8)pCreator->GetByteValue(PLAYER_BYTES, 1);     // face
    +        data << (uint8)pCreator->GetByteValue(PLAYER_BYTES, 2);     // hair
    +        data << (uint8)pCreator->GetByteValue(PLAYER_BYTES, 3);     // haircolor
    +        data << (uint8)pCreator->GetByteValue(PLAYER_BYTES_2, 0);   // facialhair
    +
    +        data << (uint32)0;                                          // unknown
    +
    +        static const EquipmentSlots ItemSlots[] = 
    +        {
    +            EQUIPMENT_SLOT_HEAD,
    +            EQUIPMENT_SLOT_SHOULDERS,
    +            EQUIPMENT_SLOT_BODY,
    +            EQUIPMENT_SLOT_CHEST,
    +            EQUIPMENT_SLOT_WAIST,
    +            EQUIPMENT_SLOT_LEGS,
    +            EQUIPMENT_SLOT_FEET,
    +            EQUIPMENT_SLOT_WRISTS,
    +            EQUIPMENT_SLOT_HANDS,
    +            EQUIPMENT_SLOT_BACK,
    +            EQUIPMENT_SLOT_TABARD,
    +            EQUIPMENT_SLOT_END
    +        };
    +
    +        // Display items in visible slots
    +        for (EquipmentSlots const* itr = &ItemSlots[0]; *itr != EQUIPMENT_SLOT_END; ++itr)
    +            if (Item const* item =  pCreator->GetItemByPos(INVENTORY_SLOT_BAG_0, *itr))
    +                data << (uint32)item->GetProto()->DisplayInfoID;    // display id
    +            else
    +                data << (uint32)0;                                  // no item found, so no id
    +    }
    +    else
    +    {
    +        // Skip player data for creatures
    +        data << (uint32)0;
    +        data << (uint32)0;
    +        data << (uint32)0;
    +        data << (uint32)0;
    +        data << (uint32)0;
    +        data << (uint32)0;
    +        data << (uint32)0;
    +        data << (uint32)0;
    +        data << (uint32)0;
    +        data << (uint32)0;
    +        data << (uint32)0;
    +        data << (uint32)0;
    +        data << (uint32)0;
    +        data << (uint32)0;
    +    }
    +
    +    SendPacket( &data );
    +}
    \\ No newline at end of file
    diff --git a/src/game/WorldSession.h b/src/game/WorldSession.h
    index 69bcb1d..052eaf2 100644
    --- a/src/game/WorldSession.h
    +++ b/src/game/WorldSession.h
    @@ -713,6 +713,7 @@ class MANGOS_DLL_SPEC WorldSession
            void HandleCalendarGetNumPending(WorldPacket& recv_data);
    
            void HandleSpellClick(WorldPacket& recv_data);
    +        void HandleMirrrorImageDataRequest(WorldPacket & recv_data);
            void HandleAlterAppearance(WorldPacket& recv_data);
            void HandleRemoveGlyph(WorldPacket& recv_data);
            void HandleCharCustomize(WorldPacket& recv_data);

    SD2:

    i'm not sure of is needed this code.

    Index: scripts/npc/npcs_special.cpp
    ===================================================================
    --- scripts/npc/npcs_special.cpp    (revision 1262)
    +++ scripts/npc/npcs_special.cpp    (working copy)
    @@ -1288,7 +1288,33 @@
        }
        return true;
    }
    +/* Need more Review!
    +struct MANGOS_DLL_DECL npc_mirror_image : public ScriptedAI
    +{
    +    npc_mirror_image(Creature* pCreature) : ScriptedAI(pCreature) {}
    +    Unit * owner;
    +    void Reset()
    +    {
    +        if (m_creature->isSummon())
    +            owner = ((Summon*)m_creature)->GetOwner();
    +        if (!owner)
    +            return;
    +        m_creature->SetDisplayId(owner->GetDisplayId());
    +        owner->SetLevel(owner->getLevel());
    +        // Inherit Master's Threat List (not yet implemented)
    +        owner->CastSpell((Unit*)NULL, 58838, true);
    +        // here mirror image casts on summoner spell (not present in client dbc) 49866
    +        // here should be auras (not present in client dbc): 35657, 35658, 35659, 35660 selfcasted by mirror images (stats related?)
    +        // Clone Me!
    +        owner->CastSpell(m_creature, 45204, false);
    +    }
    +};
    
    +CreatureAI* GetAI_npc_mirror_image(Creature* pCreature)
    +{
    +    return new npc_mirror_image(pCreature);
    +}
    +*/
    void AddSC_npcs_special()
    {
        Script *newscript;
    @@ -1354,4 +1380,9 @@
        newscript->pGossipHello = &GossipHello_npc_sayge;
        newscript->pGossipSelect = &GossipSelect_npc_sayge;
        newscript->RegisterSelf();
    +
    +    /*newscript = new Script;
    +    newscript->Name = "npc_mirror_image";
    +    newscript->GetAI = &GetAI_npc_mirror_image;
    +    newscript->RegisterSelf();*/
    }

    Thanks in Advance.

×
×
  • 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