Jump to content

Khira

Members
  • Posts

    13
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Khira's Achievements

Member

Member (2/3)

0

Reputation

  1. Hi, you need to check the existence of the string with your int32 and if it is true for 100 lines for exemple, you can say that it is really a string.
  2. Thanks for your answers, yes, i always clear my cache and reboot my server. But, really, I don't understand, maybe I translate wrong "rotation". Because I have test, and any differences...We have x, y, z and orientation for the rotation about z-axe. How is it possible to rotate an object about a center point with 4 fields? And i have already test, nothing visible... Maybe a screen or something to explain me ? Thanks again.
  3. Hi, What is function of fields rotation0, rotation1, rotation2 and rotation3 from gameobject table ? Because in 3D space, we have only 3 axes of rotation so...why 4 ? And when I try to change the value of one of them, nothing happened so...someone can explain me the utility ? Thanks and have a good day.
  4. Hi everybody, I have discover a cheat to allow to open all doors, you need to add an empty Lock.dbc in the client. With this, all doors can be opened without the need for keys or skills. So my question is : how to check the opening in the core side ? Rev : 10041 Thanks and have a good day.
  5. Any news aout this ? Maybe a hack ?
  6. 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);
  7. Hi, it is ubuntu server 9.1 and with this patch, my server is very long to reboot after a crash (it is the same time when i run the server for the first time.)
  8. Hi, how can I disable this patch ? Before this patch, my serv reboots in 5 seconds, now, it reboots in 2min.
  9. Hi, thanks for your work. I have a bug, after few seconds (maybe 1 min), the vehicle is destroyed automaticly.
  10. Any ideas ? I can't use the progression, it's always 0. Thanks
  11. Hi, thanks for this patch, he works fine ... but ... I have a little problem, when a event start, sometimes, the npcs don't sapwn, i d'ont understand what is wrong, i use a core 7701 with udb 11 and only this patch. No error during the compilation. Si I need help for this problem of hasardous spawn of creature. Thanks PS: Can you explain more about world state field ? And the condition_id in game_event_quest_condition ?
×
×
  • 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