[7424] Codestyle: removed not needed \n in log output. Author: balrok
--HG-- branch : trunk
This commit is contained in:
1 parent
f4e473c877
commit
3d3656297f
11 files changed
+112
-31
No files matched your search
@@ -929,7 +929,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
return;
|
||||
|
||||
GameObject* Crystal_Prison = m_caster->SummonGameObject(179644, creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), creatureTarget->GetOrientation(), 0, 0, 0, 0, creatureTarget->GetRespawnTime()-time(NULL));
|
||||
sLog.outDebug("SummonGameObject at SpellEfects.cpp EffectDummy for Spell 23019\n");
|
||||
sLog.outDebug("SummonGameObject at SpellEfects.cpp EffectDummy for Spell 23019");
|
||||
|
||||
creatureTarget->setDeathState(JUST_DIED);
|
||||
creatureTarget->RemoveCorpse();
|
||||
@@ -1772,7 +1772,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
|
||||
if(!spellInfo)
|
||||
{
|
||||
sLog.outError("WORLD: unknown spell id %i\n", spell_id);
|
||||
sLog.outError("WORLD: unknown spell id %i", spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1919,7 +1919,7 @@ void Spell::EffectTriggerSpellWithValue(uint32 i)
|
||||
|
||||
if(!spellInfo)
|
||||
{
|
||||
sLog.outError("EffectTriggerSpellWithValue of spell %u: triggering unknown spell id %i\n", m_spellInfo->Id,triggered_spell_id);
|
||||
sLog.outError("EffectTriggerSpellWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2168,6 +2168,7 @@ void Spell::EffectTeleportUnits(uint32 i)
|
||||
// If not exist data for dest location - return
|
||||
if(!m_targets.HasDest())
|
||||
{
|
||||
<<<<<<< HEAD:src/game/SpellEffects.cpp
|
||||
sLog.outError( "Spell::EffectTeleportUnits - does not have destination for spell ID %u\n", m_spellInfo->Id );
|
||||
return;
|
||||
}
|
||||
@@ -2188,6 +2189,86 @@ void Spell::EffectTeleportUnits(uint32 i)
|
||||
WorldPacket data;
|
||||
unitTarget->BuildTeleportAckMsg(&data, x, y, z, orientation);
|
||||
unitTarget->SendMessageToSet(&data, false);
|
||||
=======
|
||||
case TARGET_INNKEEPER_COORDINATES:
|
||||
{
|
||||
// Only players can teleport to innkeeper
|
||||
if (unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
((Player*)unitTarget)->TeleportTo(((Player*)unitTarget)->m_homebindMapId,((Player*)unitTarget)->m_homebindX,((Player*)unitTarget)->m_homebindY,((Player*)unitTarget)->m_homebindZ,unitTarget->GetOrientation(),unitTarget==m_caster ? TELE_TO_SPELL : 0);
|
||||
return;
|
||||
}
|
||||
case TARGET_TABLE_X_Y_Z_COORDINATES:
|
||||
{
|
||||
// TODO: Only players can teleport?
|
||||
if (unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
SpellTargetPosition const* st = spellmgr.GetSpellTargetPosition(m_spellInfo->Id);
|
||||
if(!st)
|
||||
{
|
||||
sLog.outError( "Spell::EffectTeleportUnits - unknown Teleport coordinates for spell ID %u", m_spellInfo->Id );
|
||||
return;
|
||||
}
|
||||
((Player*)unitTarget)->TeleportTo(st->target_mapId,st->target_X,st->target_Y,st->target_Z,st->target_Orientation,unitTarget==m_caster ? TELE_TO_SPELL : 0);
|
||||
break;
|
||||
}
|
||||
case TARGET_BEHIND_VICTIM:
|
||||
{
|
||||
// Get selected target for player (or victim for units)
|
||||
Unit *pTarget = NULL;
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
pTarget = ObjectAccessor::GetUnit(*m_caster, ((Player*)m_caster)->GetSelection());
|
||||
else
|
||||
pTarget = m_caster->getVictim();
|
||||
// No target present - return
|
||||
if (!pTarget)
|
||||
return;
|
||||
// Init dest coordinates
|
||||
uint32 mapid = m_caster->GetMapId();
|
||||
float x = m_targets.m_destX;
|
||||
float y = m_targets.m_destY;
|
||||
float z = m_targets.m_destZ;
|
||||
float orientation = pTarget->GetOrientation();
|
||||
// Teleport
|
||||
if(unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->TeleportTo(mapid, x, y, z, orientation, TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (unitTarget==m_caster ? TELE_TO_SPELL : 0));
|
||||
else
|
||||
{
|
||||
m_caster->GetMap()->CreatureRelocation((Creature*)unitTarget, x, y, z, orientation);
|
||||
WorldPacket data;
|
||||
unitTarget->BuildTeleportAckMsg(&data, x, y, z, orientation);
|
||||
unitTarget->SendMessageToSet(&data, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
default:
|
||||
{
|
||||
// If not exist data for dest location - return
|
||||
if(!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION))
|
||||
{
|
||||
sLog.outError( "Spell::EffectTeleportUnits - unknown EffectImplicitTargetB[%u] = %u for spell ID %u", i, m_spellInfo->EffectImplicitTargetB[i], m_spellInfo->Id );
|
||||
return;
|
||||
}
|
||||
// Init dest coordinates
|
||||
uint32 mapid = m_caster->GetMapId();
|
||||
float x = m_targets.m_destX;
|
||||
float y = m_targets.m_destY;
|
||||
float z = m_targets.m_destZ;
|
||||
float orientation = unitTarget->GetOrientation();
|
||||
// Teleport
|
||||
if(unitTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)unitTarget)->TeleportTo(mapid, x, y, z, orientation, TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (unitTarget==m_caster ? TELE_TO_SPELL : 0));
|
||||
else
|
||||
{
|
||||
m_caster->GetMap()->CreatureRelocation((Creature*)unitTarget, x, y, z, orientation);
|
||||
WorldPacket data;
|
||||
unitTarget->BuildTeleportAckMsg(&data, x, y, z, orientation);
|
||||
unitTarget->SendMessageToSet(&data, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
>>>>>>> 49353326cacc281efc169f4e4e8ccb517157ff23:src/game/SpellEffects.cpp
|
||||
}
|
||||
|
||||
// post effects for TARGET_TABLE_X_Y_Z_COORDINATES
|
||||
@@ -6485,7 +6566,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
||||
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel() );
|
||||
pGameObj->SetSpellId(m_spellInfo->Id);
|
||||
|
||||
DEBUG_LOG("AddObject at SpellEfects.cpp EffectTransmitted\n");
|
||||
DEBUG_LOG("AddObject at SpellEfects.cpp EffectTransmitted");
|
||||
//m_caster->AddGameObject(pGameObj);
|
||||
//m_ObjToDel.push_back(pGameObj);
|
||||
|
||||
|
||||
Reference in new issue
Block a user