Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
Closes #18816
  • Loading branch information
joschiwald committed Jan 13, 2017
1 parent e2596af commit 0f432ed
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/server/game/Entities/Player/Player.cpp
Expand Up @@ -7863,6 +7863,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, Objec
spellPrepare.ServerCastID = spell->m_castId;
SendDirectMessage(spellPrepare.Write());

spell->m_fromClient = true;
spell->m_CastItem = item;
spell->SetSpellValue(SPELLVALUE_BASE_POINT0, learning_spell_id);
spell->prepare(&targets);
Expand Down Expand Up @@ -7893,6 +7894,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, Objec
spellPrepare.ServerCastID = spell->m_castId;
SendDirectMessage(spellPrepare.Write());

spell->m_fromClient = true;
spell->m_CastItem = item;
spell->m_misc.Raw.Data[0] = misc[0];
spell->m_misc.Raw.Data[1] = misc[1];
Expand Down Expand Up @@ -7926,6 +7928,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, Objec
spellPrepare.ServerCastID = spell->m_castId;
SendDirectMessage(spellPrepare.Write());

spell->m_fromClient = true;
spell->m_CastItem = item;
spell->m_misc.Raw.Data[0] = misc[0];
spell->m_misc.Raw.Data[1] = misc[1];
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Handlers/PetHandler.cpp
Expand Up @@ -676,6 +676,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPackets::Spells::PetCastSpell&
caster->ClearUnitState(UNIT_STATE_FOLLOW);

Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE);
spell->m_fromClient = true;
spell->m_misc.Raw.Data[0] = petCastSpell.Cast.Misc[0];
spell->m_misc.Raw.Data[1] = petCastSpell.Cast.Misc[1];
spell->m_targets = targets;
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Handlers/SpellHandler.cpp
Expand Up @@ -308,6 +308,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPackets::Spells::CastSpell& cast)
spellPrepare.ServerCastID = spell->m_castId;
SendPacket(spellPrepare.Write());

spell->m_fromClient = true;
spell->m_misc.Raw.Data[0] = cast.Cast.Misc[0];
spell->m_misc.Raw.Data[1] = cast.Cast.Misc[1];
spell->prepare(&targets);
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Handlers/ToyHandler.cpp
Expand Up @@ -81,6 +81,7 @@ void WorldSession::HandleUseToy(WorldPackets::Toy::UseToy& packet)
spellPrepare.ServerCastID = spell->m_castId;
SendPacket(spellPrepare.Write());

spell->m_fromClient = true;
spell->m_castItemEntry = packet.ItemID;
spell->m_misc.Raw.Data[0] = packet.Cast.Misc[0];
spell->m_misc.Raw.Data[1] = packet.Cast.Misc[1];
Expand Down
5 changes: 3 additions & 2 deletions src/server/game/Spells/Spell.cpp
Expand Up @@ -506,6 +506,7 @@ m_spellValue(new SpellValue(caster->GetMap()->GetDifficultyID(), m_spellInfo)),

m_customError = SPELL_CUSTOM_ERROR_NONE;
m_skipCheck = skipCheck;
m_fromClient = false;
m_selfContainer = NULL;
m_referencedFromCurrentSpell = false;
m_executedCurrently = false;
Expand Down Expand Up @@ -3924,7 +3925,7 @@ void Spell::SendSpellStart()
if (schoolImmunityMask || mechanicImmunityMask)
castFlags |= CAST_FLAG_IMMUNITY;

if (((IsTriggered() && !m_spellInfo->IsAutoRepeatRangedSpell()) || m_triggeredByAuraSpell) && !m_cast_count)
if (((IsTriggered() && !m_spellInfo->IsAutoRepeatRangedSpell()) || m_triggeredByAuraSpell) && !m_fromClient)
castFlags |= CAST_FLAG_PENDING;

if (m_spellInfo->HasAttribute(SPELL_ATTR0_REQ_AMMO) || m_spellInfo->HasAttribute(SPELL_ATTR0_CU_NEEDS_AMMO_DATA))
Expand Down Expand Up @@ -4025,7 +4026,7 @@ void Spell::SendSpellGo()
uint32 castFlags = CAST_FLAG_UNKNOWN_9;

// triggered spells with spell visual != 0
if (((IsTriggered() && !m_spellInfo->IsAutoRepeatRangedSpell()) || m_triggeredByAuraSpell) && !m_cast_count)
if (((IsTriggered() && !m_spellInfo->IsAutoRepeatRangedSpell()) || m_triggeredByAuraSpell) && !m_fromClient)
castFlags |= CAST_FLAG_PENDING;

if (m_spellInfo->HasAttribute(SPELL_ATTR0_REQ_AMMO) || m_spellInfo->HasAttribute(SPELL_ATTR0_CU_NEEDS_AMMO_DATA))
Expand Down
1 change: 1 addition & 0 deletions src/server/game/Spells/Spell.h
Expand Up @@ -565,6 +565,7 @@ class TC_GAME_API Spell
int32 m_castItemLevel;
ObjectGuid m_castId;
ObjectGuid m_originalCastId;
bool m_fromClient;
uint32 m_castFlagsEx;
union
{
Expand Down

0 comments on commit 0f432ed

Please sign in to comment.