Jump to content

Mirror Image


Recommended Posts

Mirror image patch for 9589+ http://filebeam.com/f378031a38fd9d7f553ae3dadd19a5a3

based off of the patch by przemratajczak :)

Remember to apply the Mirror Image sql file

the Mirror Images will not attack there own fraction when dueling

I could not find a way to fix that bug

they Do work in PvE and Alliance vs Horde PvP

I could not get them to be renamed to the players name

they are using spell 58838 Inherit Master's Threat List - to know who to attack

this patch also has http://getmangos.eu/community/showthread.php?13025-[fix]-TemporarySummons by pasdVn :)

Link to comment
Share on other sites

  • Replies 106
  • Created
  • Last Reply

Top Posters In This Topic

Mirror image patch for 9589+ http://filebeam.com/f378031a38fd9d7f553ae3dadd19a5a3

based off of the patch by przemratajczak :)

Remember to apply the Mirror Image sql file

the Mirror Images will not attack there own fraction when dueling

I could not find a way to fix that bug

they Do work in PvE and Alliance vs Horde PvP

I could not get them to be renamed to the players name

they are using spell 58838 Inherit Master's Threat List - to know who to attack

this patch also has http://getmangos.eu/community/showthread.php?13025-[fix]-TemporarySummons by pasdVn :)

It should only Mangos and everything is working?

Does not require present in Scriptdev2 ???

missing...

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp

index 58384f4..371a634 100644

--- a/src/game/SpellEffects.cpp

+++ b/src/game/SpellEffects.cpp

-2068,6 +2068,15 @@ void Spell::EffectTriggerSpell(uint32 effIndex)

// special cases

switch(triggered_spell_id)

{

+ // Mirror Image

+ case 58832:

+ {

+ // Glyph of Mirror Image

+ if (m_caster->HasAura(63093))

+ m_caster->CastSpell(m_caster, 65047, true); // Mirror Image

+

+ break;

+ }

// Vanish (not exist)

case 18461:

{

Link to comment
Share on other sites

  • 39 years later...

hi,

I just wanted to ask, if there is already a working fix for the spell Mirror Image.

I know that there are servers, where this spell works,

but most of these servers don't spread there knowledge -.-

damn capitalists xD

ok, I would be very happy, if anyone could help me

rgds

Drako

Link to comment
Share on other sites

anyone knows what is to send to get correct naming of the mirror images? i.e. name of the player and not "mirror image".

i dont think this works on trinity. from videos floating around it looks like an aura

There's special opcode doing that probably. SMSG_MIRRORIMAGE_DATA or something.

Link to comment
Share on other sites

Hello, i know that it's working with trninity core ...

Possible to fix it with the source of trinity core p^^

...

could you tell hell it will work?

my core have this problem too; mirror image, sumon teleport(warlock) and some more

and someone alrealy told me that it work in trinity

I'd like to know more or how to about it.

thx

David

Link to comment
Share on other sites

just tried around a bit today...

seems it's a bigger part of work to import the trinity stuff to mangos :-(

many classes have too big changes to simply copy and paste things...

I think it's too complecated for me :-(

maybe someone more experienced with mangos can try to implement the spell in mangos

or import the spell from trinity?

would be very nice ;-)

regards Drako

Link to comment
Share on other sites

well even if you send the smsg_mirrorimage_data the npcs still are called MirrorImage (or whatever they are called) although they take on appearance of player.

As there is small bug in TC2 ( so I can achieve getting images without it ), names appear same as caster's when they have aura 58836. There is no flag/byte set there, only weapons coppied, so I think that client does it automaticly.

Link to comment
Share on other sites

As there is small bug in TC2 ( so I can achieve getting images without it ), names appear same as caster's when they have aura 58836. There is no flag/byte set there, only weapons coppied, so I think that client does it automaticly.

yeah thats true and i realized with trinity virtual item slots are not properly updated anyways so you get sometimes just base model and scripted summons feature of trinity is very sloppy soluted... because there is guardian ai and you can add spells that are autocasted depending on cooldown and remaining mana :D

Link to comment
Share on other sites

Don't know what you are doing, but I have weapons and offhands cloned correctly ( and AI is ok as well )

Anyway try to give them that aura, if they change name...

yes but if you already got guardian ai capable doing this why implementing separate ai and wasting code ? :D

Link to comment
Share on other sites

  • 4 weeks later...

Here is my parcial hack fix to mirror image: It summons 3 ghosts ( default visage ) and they cast.

SpellEfects.cpp

EffectSummonType()

       case SUMMON_TYPE_GUARDIAN2:
       case SUMMON_TYPE_GUARDIAN3:
+        case 1021: //SUMMON_TYPE_MIRROR_IMAGE for future
           // Jewelery statue case (totem like)
           if(m_spellInfo->SpellIconID == 2056)
               EffectSummonTotem(i);
           else
               EffectSummonGuardian(i);
           break;

EffectSummonGuardian()

if (m_caster->GetTypeId() == TYPEID_PLAYER && (duration <= 0 || GetSpellRecoveryTime(m_spellInfo) == 0))
-       if(m_caster->FindGuardianWithEntry(pet_entry))
+        if(m_caster->FindGuardianWithEntry(pet_entry) &&  pet_entry != 31216 )
           return;                                         // find old guardian, ignore summon

spawnCreature->InitStatsForLevel(level, m_caster);

+if( pet_entry == 31216  )
+{
+            spawnCreature->SetBonusDamage( int32( m_caster->SpellBaseDamageBonus( SPELL_SCHOOL_MASK_FROST ) * 0.33f ) );
+            spawnCreature->SetCreateMana(28 + 30 * level); 
+        if (addSpell( 59637 ) )
+            ToggleAutocast( 59637, true );
+
+        if (addSpell( 59638 ) )
+            ToggleAutocast( 59638, true );
+}

Link to comment
Share on other sites

  • 1 month later...

on trinity, if u cast any spell that has apply aura 58836 on npc it takes your name (no special implantation in trinity for that, its client side and i think it depends on the way u send SMSG_AURA_UPDATE). Name changing can be done in core but on mirror image it should do the following, when u mouse over the mirrors it should show in the mouseover window for example "level 80 human mage" witch in trinity its done with Clone Me spell. On trinity any spell u cast with aura 247 on a npc makes it show your class and race when u mouse over. I made the Clone Me and Name displaying thing with spell 57507 but i am sure it can be done with proper Clone me and initialize images spell. I used sendFakeAuraUpdate from a patch i saw for demonic circle.

@@ -1022,10 +1021,14 @@ void Aura::_AddAura()
        if(slot < MAX_AURAS)                        // slot found send data to client
        {
            SetAura(false);
            SetAuraFlags((1 << GetEffIndex()) | AFLAG_NOT_CASTER | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE));
            SetAuraLevel(caster ? caster->getLevel() : sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
+            if(GetId() == 57507)
+            {
+                SetAuraFlags((1 << GetEffIndex()) | ((GetAuraMaxDuration() > 0) ? AFLAG_DURATION : AFLAG_NONE) | (IsPositive() ? AFLAG_POSITIVE : AFLAG_NEGATIVE));
+            }
            SendAuraUpdate(false);
        }

        //*****************************************************
        // Update target aura state flag (at 1 aura apply)
@@ -1219,10 +1230,41 @@ bool Aura::_RemoveAura()
        }
    }

    return true;
}
+void Aura::SendFakeAuraUpdate(uint32 auraId, bool remove)
+{
+    WorldPacket data(SMSG_AURA_UPDATE);
+    data.append(m_target->GetPackGUID());
+    data << uint8(64);
+    data << uint32(remove ? 0 : auraId);
+
+    if(remove)
+    {
+        m_target->SendMessageToSet(&data, true);
+        return;
+    }
+
+    uint8 auraFlags = GetAuraFlags();
+    data << uint8(auraFlags);
+    data << uint8(GetAuraLevel());
+    data << uint8(m_procCharges ? m_procCharges : m_stackAmount);
+
+    if(!(auraFlags & AFLAG_NOT_CASTER))
+    {
+        data << uint8(0);                                   // pguid
+    }
+
+    if(auraFlags & AFLAG_DURATION)
+    {
+        data << uint32(GetAuraMaxDuration());
+        data << uint32(GetAuraDuration());
+    }
+
+    m_target->SendMessageToSet(&data, true);
+}

void Aura::SendAuraUpdate(bool remove)
{
    WorldPacket data(SMSG_AURA_UPDATE);
    data.append(m_target->GetPackGUID());
@@ -1240,11 +1282,14 @@ void Aura::SendAuraUpdate(bool remove)
    data << uint8(GetAuraLevel());
    data << uint8(m_procCharges ? m_procCharges*m_stackAmount : m_stackAmount);

    if(!(auraFlags & AFLAG_NOT_CASTER))
    {
-        data << uint8(0);                                   // pguid
+        if (Unit * caster = GetCaster())
+            data.append(caster->GetPackGUID());
+        else
+            data << uint8(0);                                   // pguid
    }

    if(auraFlags & AFLAG_DURATION)
    {
        data << uint32(GetAuraMaxDuration());

And rest is only to do

+        SendFakeAuraUpdate(62388,false);

u choose where to add "+ SendFakeAuraUpdate(62388,false);" , i added it in void Aura::HandleAuraInitializeImages(bool apply, bool Real)

This code is only to change names and race and class display when u cast 57507.

btw here is the changeset from trinity that fix mirror image http://bitbucket.org/KingPin/trinitycore2/changeset/aaf54c52f352/ . My way to change name is hacky but i think it can be done proper with change in the data sended with SMSG_AURA_UPDATE .

Link to comment
Share on other sites

I have found this code but i don't know if it works :

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index eab30ba..f20a287 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -7362,8 +7362,12 @@ void Aura::PeriodicDummyTick()
          case SPELLFAMILY_MAGE:
          {
              // Mirror Image
-//            if (spell->Id == 55342)
-//                return;
+            if (spell->Id == 55342)
+            {
+                // Set name of summons to name of caster
+                m_target->CastSpell((Unit *)NULL, m_spellProto->EffectTriggerSpell[m_effIndex], true);
+                m_isPeriodic = false;
+            }
              break;
          }
          case SPELLFAMILY_DRUID:
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 58384f4..371a634 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2068,6 +2068,15 @@ void Spell::EffectTriggerSpell(uint32 effIndex)
      // special cases
      switch(triggered_spell_id)
      {
+        // Mirror Image
+        case 58832:
+        {
+            // Glyph of Mirror Image
+            if (m_caster->HasAura(63093))
+               m_caster->CastSpell(m_caster, 65047, true); // Mirror Image
+
+            break;
+        }
          // Vanish (not exist)
          case 18461:
          {
@@ -3852,6 +3861,16 @@ void Spell::EffectSummonWild(uint32 i, uint32 forceFaction)
              summon->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
              summon->SetCreatorGUID(m_caster->GetGUID());

+            //Mirror image
+            if(creature_entry == 31216)
+            {
+                summon->SetLevel(m_caster->getLevel());
+                summon->SetHealth(28 + 30*m_caster->getLevel());
+                summon->setPowerType(POWER_MANA);
+                summon->SetPower(POWER_MANA, 28 + 30*m_caster->getLevel());
+                summon->SetPvP(true);
+            }
+
              if(forceFaction)
                  summon->setFaction(forceFaction);
          }diff --git a/sql/evo-X Update/Spells/evo_X_Spell1_mangos.sql b/sql/evo-X Update/Spells/evo_X_Spell1_mangos.sql
new file mode 100644
index 0000000..d908b77
--- /dev/null
+++ b/sql/evo-X Update/Spells/evo_X_Spell1_mangos.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;
\\ No newline at end of file
diff --git a/src/game/Opcodes.cpp b/src/game/Opcodes.cpp
index 04f7317..2b29f71 100644
--- a/src/game/Opcodes.cpp
+++ b/src/game/Opcodes.cpp
@@ -1051,8 +1051,8 @@ 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                     },
-    /*0x402*/ { "SMSG_MIRRORIMAGE_DATA",                        STATUS_NEVER,    &WorldSession::Handle_ServerSide               },
+    /*0x401*/ { "CMSG_GET_MIRRORIMAGE_DATA",                    STATUS_LOGGEDIN, &WorldSession::HandleMirrrorImageDataRequest   },
+    /*0x402*/ { "SMSG_MIRRORIMAGE_DATA",                        STATUS_LOGGEDIN, &WorldSession::Handle_ServerSide               },
      /*0x403*/ { "SMSG_FORCE_DISPLAY_UPDATE",                    STATUS_NEVER,    &WorldSession::Handle_ServerSide               },
      /*0x404*/ { "SMSG_SPELL_CHANCE_RESIST_PUSHBACK",            STATUS_NEVER,    &WorldSession::Handle_ServerSide               },
      /*0x405*/ { "CMSG_IGNORE_DIMINISHING_RETURNS_CHEAT",        STATUS_NEVER,    &WorldSession::Handle_NULL                     },
diff --git a/src/game/SpellAuraDefines.h b/src/game/SpellAuraDefines.h
index a784d2f..e5c2513 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_TARGET_ARMOR_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 f20a287..7ca4371 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -297,7 +297,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
      &Aura::HandleComprehendLanguage,                        //244 SPELL_AURA_COMPREHEND_LANGUAGE
      &Aura::HandleNoImmediateEffect,                         //245 SPELL_AURA_MOD_DURATION_OF_MAGIC_EFFECTS     implemented in Unit::CalculateSpellDuration
      &Aura::HandleNoImmediateEffect,                         //246 SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL implemented in Unit::CalculateSpellDuration
-    &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
@@ -329,7 +329,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::HandleModTargetArmorPct,                         //280 SPELL_AURA_MOD_TARGET_ARMOR_PCT
      &Aura::HandleNoImmediateEffect,                         //281 SPELL_AURA_MOD_HONOR_GAIN             implemented in Player::RewardHonor
      &Aura::HandleAuraIncreaseBaseHealthPercent,             //282 SPELL_AURA_INCREASE_BASE_HEALTH_PERCENT
@@ -7844,3 +7844,42 @@ void Aura::HandleAllowOnlyAbility(bool apply, bool Real)
      m_target->UpdateDamagePhysical(RANGED_ATTACK);
      m_target->UpdateDamagePhysical(OFF_ATTACK);
  }
+
+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 5698f36..731fbd0 100644
--- a/src/game/SpellAuras.h
+++ b/src/game/SpellAuras.h
@@ -215,6 +215,8 @@ class MANGOS_DLL_SPEC Aura
          void HandleModTargetArmorPct(bool Apply, bool Real);
          void HandleAuraModAllCritChance(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 433f266..f6318c5 100644
--- a/src/game/SpellHandler.cpp
+++ b/src/game/SpellHandler.cpp
@@ -575,3 +575,83 @@ void WorldSession::HandleSpellClick( WorldPacket & recv_data )
          }
      }
  }
+void WorldSession::HandleMirrrorImageDataRequest( WorldPacket & recv_data )
+{
+    sLog.outDebug("WORLD: CMSG_GET_MIRRORIMAGE_DATA");
+    uint64 guid;
+    recv_data >> guid;
+
+    // Get unit for which data is needed by client
+    Unit *unit = ObjectAccessor::GetUnit(*_player, guid);
+    if (!unit)
+        return;
+
+    // Get creator of the unit
+    Unit *creator = ObjectAccessor::GetUnit(*_player, unit->GetCreatorGUID());
+    if (!creator)
+        creator = unit;
+
+    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,
+            E QUIPMENT_SLOT_CHEST,
+            EQUIPMENT_SLOT_WAIST,
+            EQUIPMENT_SLOT_LEGS,
+            EQUIPMENT_SLOT_FEET,
+            E QUIPMENT_SLOT_WRISTS,
+            EQUIPMENT_SLOT_HANDS,
+            EQUIPMENT_SLOT_BACK,
+            EQUIPMENT_SLOT_TABARD,
+            E QUIPMENT_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 aa69a84..90c98c8 100644
--- a/src/game/WorldSession.h
+++ b/src/game/WoЗrldSession.h
@@ -730,6 +730,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); 

Link to comment
Share on other sites

Script

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();*/

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

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