aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Creature.cpp4
-rw-r--r--src/game/Map.cpp2
-rw-r--r--src/game/ObjectAccessor.cpp2
-rw-r--r--src/game/PetHandler.cpp32
-rw-r--r--src/game/Player.cpp4
-rw-r--r--src/game/SkillHandler.cpp2
-rw-r--r--src/game/Spell.cpp2
-rw-r--r--src/game/SpellEffects.cpp89
-rw-r--r--src/game/Unit.cpp2
-rw-r--r--src/game/WorldSocket.cpp2
-rw-r--r--src/shared/revision_nr.h2
11 files changed, 112 insertions, 31 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 04950f1cab5..71f53cdabb0 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -1721,7 +1721,7 @@ SpellEntry const *Creature::reachWithSpellAttack(Unit *pVictim)
SpellEntry const *spellInfo = sSpellStore.LookupEntry(m_spells[i] );
if(!spellInfo)
{
- sLog.outError("WORLD: unknown spell id %i\n", m_spells[i]);
+ sLog.outError("WORLD: unknown spell id %i", m_spells[i]);
continue;
}
@@ -1771,7 +1771,7 @@ SpellEntry const *Creature::reachWithSpellCure(Unit *pVictim)
SpellEntry const *spellInfo = sSpellStore.LookupEntry(m_spells[i] );
if(!spellInfo)
{
- sLog.outError("WORLD: unknown spell id %i\n", m_spells[i]);
+ sLog.outError("WORLD: unknown spell id %i", m_spells[i]);
continue;
}
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index 1fa040640bb..9bf47e530da 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -2061,7 +2061,7 @@ void InstanceMap::PermBindAllPlayers(Player *player)
InstanceSave *save = sInstanceSaveManager.GetInstanceSave(GetInstanceId());
if(!save)
{
- sLog.outError("Cannot bind players, no instance save available for map!\n");
+ sLog.outError("Cannot bind players, no instance save available for map!");
return;
}
diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp
index db9717759e7..cc4231fa14a 100644
--- a/src/game/ObjectAccessor.cpp
+++ b/src/game/ObjectAccessor.cpp
@@ -410,7 +410,7 @@ ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool insignia)
return NULL;
}
- DEBUG_LOG("Deleting Corpse and spawning bones.\n");
+ DEBUG_LOG("Deleting Corpse and spawning bones.");
// remove corpse from player_guid -> corpse map
RemoveCorpse(corpse);
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index b5dbce89089..2cc049ebd84 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -46,16 +46,16 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
// used also for charmed creature
Unit* pet= ObjectAccessor::GetUnit(*_player, guid1);
- sLog.outDetail("HandlePetAction.Pet %u flag is %u, spellid is %u, target %u.\n", uint32(GUID_LOPART(guid1)), flag, spellid, uint32(GUID_LOPART(guid2)) );
+ sLog.outDetail("HandlePetAction.Pet %u flag is %u, spellid is %u, target %u.", uint32(GUID_LOPART(guid1)), flag, spellid, uint32(GUID_LOPART(guid2)) );
if(!pet)
{
- sLog.outError( "Pet %u not exist.\n", uint32(GUID_LOPART(guid1)) );
+ sLog.outError( "Pet %u not exist.", uint32(GUID_LOPART(guid1)) );
return;
}
if(pet != GetPlayer()->GetPet() && pet != GetPlayer()->GetCharm())
{
- sLog.outError("HandlePetAction.Pet %u isn't pet of player %s.\n", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName() );
+ sLog.outError("HandlePetAction.Pet %u isn't pet of player %s.", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName() );
return;
}
@@ -159,7 +159,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
_player->Uncharm();
break;
default:
- sLog.outError("WORLD: unknown PET flag Action %i and spellid %i.\n", flag, spellid);
+ sLog.outError("WORLD: unknown PET flag Action %i and spellid %i.", flag, spellid);
}
break;
case ACT_REACTION: // 0x600
@@ -188,7 +188,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellid );
if(!spellInfo)
{
- sLog.outError("WORLD: unknown PET spell id %i\n", spellid);
+ sLog.outError("WORLD: unknown PET spell id %i", spellid);
return;
}
@@ -278,7 +278,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
break;
}
default:
- sLog.outError("WORLD: unknown PET flag Action %i and spellid %i.\n", flag, spellid);
+ sLog.outError("WORLD: unknown PET flag Action %i and spellid %i.", flag, spellid);
}
}
@@ -286,7 +286,7 @@ void WorldSession::HandlePetNameQuery( WorldPacket & recv_data )
{
CHECK_PACKET_SIZE(recv_data,4+8);
- sLog.outDetail( "HandlePetNameQuery. CMSG_PET_NAME_QUERY\n" );
+ sLog.outDetail( "HandlePetNameQuery. CMSG_PET_NAME_QUERY" );
uint32 petnumber;
uint64 petguid;
@@ -326,7 +326,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
{
CHECK_PACKET_SIZE(recv_data, 8+4+2+2);
- sLog.outDetail( "HandlePetSetAction. CMSG_PET_SET_ACTION\n" );
+ sLog.outDetail( "HandlePetSetAction. CMSG_PET_SET_ACTION" );
uint64 petguid;
uint32 position;
@@ -345,7 +345,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
if(!pet || (pet != _player->GetPet() && pet != _player->GetCharm()))
{
- sLog.outError( "HandlePetSetAction: Unknown pet or pet owner.\n" );
+ sLog.outError( "HandlePetSetAction: Unknown pet or pet owner." );
return;
}
@@ -363,7 +363,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
recv_data >> spell_id;
recv_data >> act_state;
- sLog.outDetail( "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X\n", _player->GetName(), position, spell_id, act_state);
+ sLog.outDetail( "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X", _player->GetName(), position, spell_id, act_state);
//if it's act for spell (en/disable/cast) and there is a spell given (0 = remove spell) which pet doesn't know, don't add
if(!((act_state == ACT_ENABLED || act_state == ACT_DISABLED || act_state == ACT_PASSIVE) && spell_id && !pet->HasSpell(spell_id)))
@@ -395,7 +395,7 @@ void WorldSession::HandlePetRename( WorldPacket & recv_data )
{
CHECK_PACKET_SIZE(recv_data, 8+1);
- sLog.outDetail( "HandlePetRename. CMSG_PET_RENAME\n" );
+ sLog.outDetail( "HandlePetRename. CMSG_PET_RENAME" );
uint64 petguid;
uint8 isdeclined;
@@ -511,7 +511,7 @@ void WorldSession::HandlePetUnlearnOpcode(WorldPacket& recvPacket)
if(guid != pet->GetGUID())
{
- sLog.outError( "HandlePetUnlearnOpcode.Pet %u isn't pet of player %s .\n", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() );
+ sLog.outError( "HandlePetUnlearnOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() );
return;
}
@@ -545,7 +545,7 @@ void WorldSession::HandlePetSpellAutocastOpcode( WorldPacket& recvPacket )
if(!pet || (pet != _player->GetPet() && pet != _player->GetCharm()))
{
- sLog.outError( "HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s .\n", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() );
+ sLog.outError( "HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() );
return;
}
@@ -595,7 +595,7 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
if(!caster || (caster != _player->GetPet() && caster != _player->GetCharm()))
{
- sLog.outError( "HandlePetCastSpellOpcode: Pet %u isn't pet of player %s .\n", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() );
+ sLog.outError( "HandlePetCastSpellOpcode: Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() );
return;
}
@@ -605,7 +605,7 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellid);
if(!spellInfo)
{
- sLog.outError("WORLD: unknown PET spell id %i\n", spellid);
+ sLog.outError("WORLD: unknown PET spell id %i", spellid);
return;
}
@@ -803,5 +803,5 @@ void WorldSession::HandlePetLearnTalent( WorldPacket & recv_data )
// learn! (other talent ranks will unlearned at learning)
pet->learnSpell(spellid);
- sLog.outDetail("TalentID: %u Rank: %u Spell: %u\n", talent_id, requested_rank, spellid);
+ sLog.outDetail("TalentID: %u Rank: %u Spell: %u", talent_id, requested_rank, spellid);
}
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index a9bf8006374..4ca33c693ea 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -16115,7 +16115,7 @@ bool Player::_LoadHomeBind(QueryResult *result)
CharacterDatabase.PExecute("INSERT INTO character_homebind (guid,map,zone,position_x,position_y,position_z) VALUES ('%u', '%u', '%u', '%f', '%f', '%f')", GetGUIDLow(), m_homebindMapId, (uint32)m_homebindZoneId, m_homebindX, m_homebindY, m_homebindZ);
}
- DEBUG_LOG("Setting player home position: mapid is: %u, zoneid is %u, X is %f, Y is %f, Z is %f\n",
+ DEBUG_LOG("Setting player home position: mapid is: %u, zoneid is %u, X is %f, Y is %f, Z is %f",
m_homebindMapId, m_homebindZoneId, m_homebindX, m_homebindY, m_homebindZ);
return true;
@@ -20639,4 +20639,4 @@ void Player::HandleFall(MovementInfo const& movementInfo)
void Player::UpdateAchievementCriteria( AchievementCriteriaTypes type, uint32 miscvalue1/*=0*/, uint32 miscvalue2/*=0*/, Unit *unit/*=NULL*/, uint32 time/*=0*/ )
{
GetAchievementMgr().UpdateAchievementCriteria(type, miscvalue1,miscvalue2,unit,time);
-} \ No newline at end of file
+}
diff --git a/src/game/SkillHandler.cpp b/src/game/SkillHandler.cpp
index 154328af049..a6d854d25ce 100644
--- a/src/game/SkillHandler.cpp
+++ b/src/game/SkillHandler.cpp
@@ -128,7 +128,7 @@ void WorldSession::HandleLearnTalentOpcode( WorldPacket & recv_data )
// learn! (other talent ranks will unlearned at learning)
GetPlayer( )->learnSpell(spellid,false);
- sLog.outDetail("TalentID: %u Rank: %u Spell: %u\n", talent_id, requested_rank, spellid);
+ sLog.outDetail("TalentID: %u Rank: %u Spell: %u", talent_id, requested_rank, spellid);
// update free talent points
GetPlayer()->SetFreeTalentPoints(CurTalentPoints - 1);
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 54b2e582531..c35f67a68c6 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -3483,7 +3483,7 @@ void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTar
EffectEnchantItemTmp(i);
else
{
- sLog.outError("SPELL: unknown effect %u spell id %u\n",
+ sLog.outError("SPELL: unknown effect %u spell id %u",
eff, m_spellInfo->Id);
}
}
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 349051b727a..12a7aa2078f 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -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);
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 171526aaf7f..2404d84cb6d 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -1127,7 +1127,7 @@ void Unit::CastCustomSpell(Unit* Victim,uint32 spellId, int32 const* bp0, int32
if(!spellInfo)
{
- sLog.outError("CastCustomSpell: unknown spell id %i\n", spellId);
+ sLog.outError("CastCustomSpell: unknown spell id %i", spellId);
return;
}
diff --git a/src/game/WorldSocket.cpp b/src/game/WorldSocket.cpp
index 6c94dbd8cb4..077c7a0d7e9 100644
--- a/src/game/WorldSocket.cpp
+++ b/src/game/WorldSocket.cpp
@@ -317,7 +317,7 @@ int WorldSocket::handle_input (ACE_HANDLE)
}
case 0:
{
- DEBUG_LOG ("WorldSocket::handle_input: Peer has closed connection\n");
+ DEBUG_LOG ("WorldSocket::handle_input: Peer has closed connection");
errno = ECONNRESET;
return -1;
diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h
index ff2d069c8f3..3c5eab9d398 100644
--- a/src/shared/revision_nr.h
+++ b/src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "7423"
+ #define REVISION_NR "7424"
#endif // __REVISION_NR_H__