Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Компиляция и настройка ScriptDev2
#11
точно незнаю куда писать, поэтому напишу сюда. насколько я понял, чтобы починить какой нить скил нужно скачать патч на этот скилл и скомпилировать с ним ядро.... как то так...
вот у меня есть патч
Цитата: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:TongueeriodicDummyTick()
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);
Что делать дальше я и понятия не имею... не могли бы вы мне разъяснить от и до, как сделать так, чтобы этот патч заработал .... ( как можно подробнее плиз )
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Компиляция ядра, создание сборки Trinity Core 3.3.5a под Win32 PuShKinG 199 151,492 10-30-2019, 10:18 AM
Последний пост: VikingBO
  Компиляция исходных кодов TrinityCore на Linux Kirito 0 5,142 03-04-2012, 10:38 PM
Последний пост: Kirito
  Компиляция сервера под Линукс на винде maa 5 4,093 12-20-2011, 06:28 PM
Последний пост: Itachi
  Компиляция и базовая настройка сервера MaNGOS (3.0.9) PROGRAMMATOR 125 59,812 04-12-2011, 01:43 PM
Последний пост: PROGRAMMATOR
  Настройка портов Апача в денвере. Cool_prime 4 7,157 05-02-2010, 10:16 PM
Последний пост: Cool_prime
  Linux, компиляция, С++ Arsenn 5 4,086 03-10-2010, 03:23 PM
Последний пост: Arsenn
  Настройка Fugunsk 0 5,139 01-24-2009, 06:36 PM
Последний пост: Fugunsk

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)