aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities
diff options
context:
space:
mode:
authorjoschiwald <joschiwald.trinity@gmail.com>2015-01-17 03:55:29 +0100
committerjoschiwald <joschiwald.trinity@gmail.com>2015-01-17 03:55:29 +0100
commit36e50ff8ae48855e8dd240aa602058b1593400a8 (patch)
treef6a2b3d2be363750cf94db3c5fbd8444763b30f7 /src/server/game/Entities
parentb21c346658d6165251363f7a86cfa8c7f5925ba9 (diff)
Core/Opcodes: sync with wpp
Diffstat (limited to 'src/server/game/Entities')
-rw-r--r--src/server/game/Entities/Player/Player.cpp7
-rw-r--r--src/server/game/Entities/Player/Player.h2
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp56
3 files changed, 32 insertions, 33 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 2ec00d8f818..188205dcaca 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -9627,11 +9627,10 @@ void Player::SetBindPoint(ObjectGuid guid)
GetSession()->SendPacket(&data);
}
-void Player::SendTalentWipeConfirm(ObjectGuid guid)
+void Player::SendRespecWipeConfirm(ObjectGuid const& guid, uint32 cost)
{
- WorldPacket data(MSG_TALENT_WIPE_CONFIRM, 8 + 4);
+ WorldPacket data(SMSG_RESPEC_WIPE_CONFIRM, 8 + 4);
data << guid;
- uint32 cost = sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : GetNextResetTalentsCost();
data << cost;
GetSession()->SendPacket(&data);
}
@@ -14022,7 +14021,7 @@ void Player::OnGossipSelect(WorldObject* source, uint32 gossipListId, uint32 men
break;
case GOSSIP_OPTION_UNLEARNTALENTS:
PlayerTalkClass->SendCloseGossip();
- SendTalentWipeConfirm(guid);
+ SendRespecWipeConfirm(guid, sWorld->getBoolConfig(CONFIG_NO_RESET_TALENT_COST) ? 0 : GetNextResetTalentsCost());
break;
case GOSSIP_OPTION_UNLEARNPETTALENTS:
PlayerTalkClass->SendCloseGossip();
diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h
index 8c36ba55010..f38b8363615 100644
--- a/src/server/game/Entities/Player/Player.h
+++ b/src/server/game/Entities/Player/Player.h
@@ -1737,7 +1737,7 @@ class Player : public Unit, public GridObject<Player>
bool m_mailsUpdated;
void SetBindPoint(ObjectGuid guid);
- void SendTalentWipeConfirm(ObjectGuid guid);
+ void SendRespecWipeConfirm(ObjectGuid const& guid, uint32 cost);
void ResetPetTalents();
void CalcRage(uint32 damage, bool attacker);
void RegenerateAll();
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index f9ed7acb3eb..d20ba57f504 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -1378,7 +1378,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
victim->DealDamageMods(this, damage, NULL);
/// @todo Move this to a packet handler
- WorldPacket data(SMSG_SPELLDAMAGESHIELD, 8 + 8 + 4 + 4 + 4 + 4 + 4);
+ WorldPacket data(SMSG_SPELL_DAMAGE_SHIELD, 8 + 8 + 4 + 4 + 4 + 4 + 4);
data << victim->GetGUID();
data << GetGUID();
data << uint32(i_spellProto->Id);
@@ -8036,7 +8036,7 @@ void Unit::UnsummonAllTotems()
void Unit::SendHealSpellLog(Unit* victim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical)
{
// we guess size
- WorldPacket data(SMSG_SPELLHEALLOG, 8 + 8 + 4 + 4 + 4 + 4 + 1 + 1);
+ WorldPacket data(SMSG_SPELL_HEAL_LOG, 8 + 8 + 4 + 4 + 4 + 4 + 1 + 1);
data << victim->GetPackGUID();
data << GetPackGUID();
data << uint32(SpellID);
@@ -8061,7 +8061,7 @@ int32 Unit::HealBySpell(Unit* victim, SpellInfo const* spellInfo, uint32 addHeal
void Unit::SendEnergizeSpellLog(Unit* victim, uint32 spellId, int32 damage, Powers powerType)
{
- WorldPacket data(SMSG_SPELLENERGIZELOG, (8+8+4+4+4+1));
+ WorldPacket data(SMSG_SPELL_ENERGIZE_LOG, (8+8+4+4+4+1));
data << victim->GetPackGUID();
data << GetPackGUID();
data << uint32(spellId);
@@ -10374,15 +10374,15 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
// Spline packets are for creatures and move_update are for players
static OpcodeServer const moveTypeToOpcode[MAX_MOVE_TYPE][3] =
{
- {SMSG_SPLINE_MOVE_SET_WALK_SPEED, SMSG_MOVE_SET_WALK_SPEED, SMSG_MOVE_UPDATE_WALK_SPEED },
- {SMSG_SPLINE_MOVE_SET_RUN_SPEED, SMSG_MOVE_SET_RUN_SPEED, SMSG_MOVE_UPDATE_RUN_SPEED },
- {SMSG_SPLINE_MOVE_SET_RUN_BACK_SPEED, SMSG_MOVE_SET_RUN_BACK_SPEED, SMSG_MOVE_UPDATE_RUN_BACK_SPEED },
- {SMSG_SPLINE_MOVE_SET_SWIM_SPEED, SMSG_MOVE_SET_SWIM_SPEED, SMSG_MOVE_UPDATE_SWIM_SPEED },
- {SMSG_SPLINE_MOVE_SET_SWIM_BACK_SPEED, SMSG_MOVE_SET_SWIM_BACK_SPEED, SMSG_MOVE_UPDATE_SWIM_BACK_SPEED },
- {SMSG_SPLINE_MOVE_SET_TURN_RATE, SMSG_MOVE_SET_TURN_RATE, SMSG_MOVE_UPDATE_TURN_RATE },
- {SMSG_SPLINE_MOVE_SET_FLIGHT_SPEED, SMSG_MOVE_SET_FLIGHT_SPEED, SMSG_MOVE_UPDATE_FLIGHT_SPEED },
- {SMSG_SPLINE_MOVE_SET_FLIGHT_BACK_SPEED, SMSG_MOVE_SET_FLIGHT_BACK_SPEED, SMSG_MOVE_UPDATE_FLIGHT_BACK_SPEED},
- {SMSG_SPLINE_MOVE_SET_PITCH_RATE, SMSG_MOVE_SET_PITCH_RATE, SMSG_MOVE_UPDATE_PITCH_RATE },
+ {SMSG_MOVE_SPLINE_SET_WALK_SPEED, SMSG_MOVE_SET_WALK_SPEED, SMSG_MOVE_UPDATE_WALK_SPEED },
+ {SMSG_MOVE_SPLINE_SET_RUN_SPEED, SMSG_MOVE_SET_RUN_SPEED, SMSG_MOVE_UPDATE_RUN_SPEED },
+ {SMSG_MOVE_SPLINE_SET_RUN_BACK_SPEED, SMSG_MOVE_SET_RUN_BACK_SPEED, SMSG_MOVE_UPDATE_RUN_BACK_SPEED },
+ {SMSG_MOVE_SPLINE_SET_SWIM_SPEED, SMSG_MOVE_SET_SWIM_SPEED, SMSG_MOVE_UPDATE_SWIM_SPEED },
+ {SMSG_MOVE_SPLINE_SET_SWIM_BACK_SPEED, SMSG_MOVE_SET_SWIM_BACK_SPEED, SMSG_MOVE_UPDATE_SWIM_BACK_SPEED },
+ {SMSG_MOVE_SPLINE_SET_TURN_RATE, SMSG_MOVE_SET_TURN_RATE, SMSG_MOVE_UPDATE_TURN_RATE },
+ {SMSG_MOVE_SPLINE_SET_FLIGHT_SPEED, SMSG_MOVE_SET_FLIGHT_SPEED, SMSG_MOVE_UPDATE_FLIGHT_SPEED },
+ {SMSG_MOVE_SPLINE_SET_FLIGHT_BACK_SPEED, SMSG_MOVE_SET_FLIGHT_BACK_SPEED, SMSG_MOVE_UPDATE_FLIGHT_BACK_SPEED},
+ {SMSG_MOVE_SPLINE_SET_PITCH_RATE, SMSG_MOVE_SET_PITCH_RATE, SMSG_MOVE_UPDATE_PITCH_RATE },
};
if (GetTypeId() == TYPEID_PLAYER)
@@ -13753,9 +13753,9 @@ void Unit::SetRooted(bool apply, bool packetOnly /*= false*/)
}
if (apply)
- Movement::PacketSender(this, SMSG_SPLINE_MOVE_ROOT, SMSG_MOVE_ROOT, SMSG_MOVE_ROOT).Send();
+ Movement::PacketSender(this, SMSG_MOVE_SPLINE_ROOT, SMSG_MOVE_ROOT, SMSG_MOVE_ROOT).Send();
else
- Movement::PacketSender(this, SMSG_SPLINE_MOVE_UNROOT, SMSG_MOVE_UNROOT, SMSG_MOVE_UNROOT).Send();
+ Movement::PacketSender(this, SMSG_MOVE_SPLINE_UNROOT, SMSG_MOVE_UNROOT, SMSG_MOVE_UNROOT).Send();
}
void Unit::SetFeared(bool apply)
@@ -15855,9 +15855,9 @@ bool Unit::SetWalk(bool enable)
///@ TODO: Find proper opcode for walk mode setting in player mind controlling a player case
if (enable)
- Movement::PacketSender(this, SMSG_SPLINE_MOVE_SET_WALK_MODE, SMSG_SPLINE_MOVE_SET_WALK_MODE).Send();
+ Movement::PacketSender(this, SMSG_MOVE_SPLINE_SET_WALK_MODE, SMSG_MOVE_SPLINE_SET_WALK_MODE).Send();
else
- Movement::PacketSender(this, SMSG_SPLINE_MOVE_SET_RUN_MODE, SMSG_SPLINE_MOVE_SET_RUN_MODE).Send();
+ Movement::PacketSender(this, SMSG_MOVE_SPLINE_SET_RUN_MODE, SMSG_MOVE_SPLINE_SET_RUN_MODE).Send();
return true;
}
@@ -15885,8 +15885,8 @@ bool Unit::SetDisableGravity(bool disable, bool packetOnly /*= false*/)
static OpcodeServer const gravityOpcodeTable[2][2] =
{
- {SMSG_SPLINE_MOVE_GRAVITY_ENABLE, SMSG_MOVE_GRAVITY_ENABLE },
- {SMSG_SPLINE_MOVE_GRAVITY_DISABLE, SMSG_MOVE_GRAVITY_DISABLE }
+ {SMSG_MOVE_SPLINE_ENABLE_GRAVITY, SMSG_MOVE_GRAVITY_ENABLE },
+ {SMSG_MOVE_SPLINE_DISABLE_GRAVITY, SMSG_MOVE_GRAVITY_DISABLE }
};
bool player = GetTypeId() == TYPEID_PLAYER && ToPlayer()->m_mover->GetTypeId() == TYPEID_PLAYER;
@@ -15934,7 +15934,7 @@ bool Unit::SetSwim(bool enable)
else
RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING);
- static OpcodeServer const swimOpcodeTable[2] = {SMSG_SPLINE_MOVE_STOP_SWIM, SMSG_SPLINE_MOVE_START_SWIM};
+ static OpcodeServer const swimOpcodeTable[2] = { SMSG_MOVE_SPLINE_STOP_SWIM, SMSG_MOVE_SPLINE_START_SWIM};
WorldPackets::Movement::MoveSplineSetFlag packet(swimOpcodeTable[enable]);
packet.MoverGUID = GetGUID();
@@ -15963,8 +15963,8 @@ bool Unit::SetCanFly(bool enable)
static OpcodeServer const flyOpcodeTable[2][2] =
{
- {SMSG_SPLINE_MOVE_UNSET_FLYING, SMSG_MOVE_UNSET_CAN_FLY },
- {SMSG_SPLINE_MOVE_SET_FLYING, SMSG_MOVE_SET_CAN_FLY }
+ { SMSG_MOVE_SPLINE_UNSET_FLYING, SMSG_MOVE_UNSET_CAN_FLY },
+ { SMSG_MOVE_SPLINE_SET_FLYING, SMSG_MOVE_SET_CAN_FLY }
};
bool player = GetTypeId() == TYPEID_PLAYER && ToPlayer()->m_mover->GetTypeId() == TYPEID_PLAYER;
@@ -16001,8 +16001,8 @@ bool Unit::SetWaterWalking(bool enable, bool packetOnly /*= false */)
static OpcodeServer const waterWalkingOpcodeTable[2][2] =
{
- {SMSG_SPLINE_MOVE_SET_LAND_WALK, SMSG_MOVE_LAND_WALK },
- {SMSG_SPLINE_MOVE_SET_WATER_WALK, SMSG_MOVE_WATER_WALK}
+ { SMSG_MOVE_SPLINE_SET_LAND_WALK, SMSG_MOVE_LAND_WALK },
+ { SMSG_MOVE_SPLINE_SET_WATER_WALK, SMSG_MOVE_WATER_WALK }
};
bool player = GetTypeId() == TYPEID_PLAYER && ToPlayer()->m_mover->GetTypeId() == TYPEID_PLAYER;
@@ -16039,8 +16039,8 @@ bool Unit::SetFeatherFall(bool enable, bool packetOnly /*= false */)
static OpcodeServer const featherFallOpcodeTable[2][2] =
{
- {SMSG_SPLINE_MOVE_SET_NORMAL_FALL, SMSG_MOVE_NORMAL_FALL },
- {SMSG_SPLINE_MOVE_SET_FEATHER_FALL, SMSG_MOVE_FEATHER_FALL }
+ { SMSG_MOVE_SPLINE_SET_NORMAL_FALL, SMSG_MOVE_NORMAL_FALL },
+ { SMSG_MOVE_SPLINE_SET_FEATHER_FALL, SMSG_MOVE_FEATHER_FALL }
};
bool player = GetTypeId() == TYPEID_PLAYER && ToPlayer()->m_mover->GetTypeId() == TYPEID_PLAYER;
@@ -16092,8 +16092,8 @@ bool Unit::SetHover(bool enable, bool packetOnly /*= false*/)
static OpcodeServer const hoverOpcodeTable[2][2] =
{
- {SMSG_SPLINE_MOVE_UNSET_HOVER, SMSG_MOVE_UNSET_HOVER },
- {SMSG_SPLINE_MOVE_SET_HOVER, SMSG_MOVE_SET_HOVER }
+ { SMSG_MOVE_SPLINE_UNSET_HOVER, SMSG_MOVE_UNSET_HOVER },
+ { SMSG_MOVE_SPLINE_SET_HOVER, SMSG_MOVE_SET_HOVER }
};
bool player = GetTypeId() == TYPEID_PLAYER && ToPlayer()->m_mover->GetTypeId() == TYPEID_PLAYER;
@@ -16143,7 +16143,7 @@ void Unit::SendSetPlayHoverAnim(bool enable)
void Unit::SendMovementSetSplineAnim(Movement::AnimType anim)
{
- WorldPacket data(SMSG_SPLINE_MOVE_SET_ANIM, 8 + 4);
+ WorldPacket data(SMSG_MOVE_SPLINE_SET_ANIM, 8 + 4);
data << GetPackGUID();
data << uint32(anim);
SendMessageToSet(&data, false);