mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
Big update.
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
#include "Channel.h"
|
||||
#include "ChannelMgr.h"
|
||||
#include "Formulas.h"
|
||||
#include "GameTime.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Group.h"
|
||||
#include "Guild.h"
|
||||
#include "InstanceScript.h"
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
#include "SavingSystem.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SkillDiscovery.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
@@ -37,17 +36,17 @@
|
||||
#include "UpdateFieldFlags.h"
|
||||
#include "Vehicle.h"
|
||||
#include "WeatherMgr.h"
|
||||
#include "WorldStatePackets.h"
|
||||
|
||||
#ifdef PLAYERBOTS
|
||||
#include "Playerbot.h"
|
||||
#endif
|
||||
// TODO: this import is not necessary for compilation and marked as unused by the IDE
|
||||
// however, for some reasons removing it would cause a damn linking issue
|
||||
// there is probably some underlying problem with imports which should properly addressed
|
||||
// see: https://github.com/azerothcore/azerothcore-wotlk/issues/9766
|
||||
#include "GridNotifiersImpl.h"
|
||||
|
||||
// Zone Interval should be 1 second
|
||||
constexpr auto ZONE_UPDATE_INTERVAL = 1000;
|
||||
|
||||
constexpr auto CINEMATIC_UPDATEDIFF = 500;
|
||||
constexpr auto CINEMATIC_LOOKAHEAD = 2000;
|
||||
|
||||
void Player::Update(uint32 p_time)
|
||||
{
|
||||
if (!IsInWorld())
|
||||
@@ -56,7 +55,7 @@ void Player::Update(uint32 p_time)
|
||||
sScriptMgr->OnBeforePlayerUpdate(this, p_time);
|
||||
|
||||
// undelivered mail
|
||||
if (m_nextMailDelivereTime && m_nextMailDelivereTime <= time(nullptr))
|
||||
if (m_nextMailDelivereTime && m_nextMailDelivereTime <= GameTime::GetGameTime().count())
|
||||
{
|
||||
SendNewMail();
|
||||
++unReadMails;
|
||||
@@ -68,12 +67,11 @@ void Player::Update(uint32 p_time)
|
||||
|
||||
// Update cinematic location, if 500ms have passed and we're doing a
|
||||
// cinematic now.
|
||||
m_cinematicDiff += p_time;
|
||||
if (m_cinematicCamera && m_activeCinematicCameraId &&
|
||||
GetMSTimeDiffToNow(m_lastCinematicCheck) > CINEMATIC_UPDATEDIFF)
|
||||
_cinematicMgr->m_cinematicDiff += p_time;
|
||||
if (_cinematicMgr->m_cinematicCamera && _cinematicMgr->m_activeCinematicCameraId && GetMSTimeDiffToNow(_cinematicMgr->m_lastCinematicCheck) > CINEMATIC_UPDATEDIFF)
|
||||
{
|
||||
m_lastCinematicCheck = getMSTime();
|
||||
UpdateCinematicLocation(p_time);
|
||||
_cinematicMgr->m_lastCinematicCheck = getMSTime();
|
||||
_cinematicMgr->UpdateCinematicLocation(p_time);
|
||||
}
|
||||
|
||||
// used to implement delayed far teleports
|
||||
@@ -81,7 +79,7 @@ void Player::Update(uint32 p_time)
|
||||
Unit::Update(p_time);
|
||||
SetMustDelayTeleport(false);
|
||||
|
||||
time_t now = time(nullptr);
|
||||
time_t now = GameTime::GetGameTime().count();
|
||||
|
||||
UpdatePvPFlag(now);
|
||||
UpdateFFAPvPFlag(now);
|
||||
@@ -131,10 +129,10 @@ void Player::Update(uint32 p_time)
|
||||
GetSession()->m_muteTime = 0;
|
||||
LoginDatabasePreparedStatement* stmt =
|
||||
LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME);
|
||||
stmt->setInt64(0, 0); // Set the mute time to 0
|
||||
stmt->setString(1, "");
|
||||
stmt->setString(2, "");
|
||||
stmt->setUInt32(3, GetSession()->GetAccountId());
|
||||
stmt->SetData(0, 0); // Set the mute time to 0
|
||||
stmt->SetData(1, "");
|
||||
stmt->SetData(2, "");
|
||||
stmt->SetData(3, GetSession()->GetAccountId());
|
||||
LoginDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
@@ -238,7 +236,7 @@ void Player::Update(uint32 p_time)
|
||||
{
|
||||
if (now > lastTick && _restTime > 0) // freeze update
|
||||
{
|
||||
time_t currTime = time(nullptr);
|
||||
time_t currTime = GameTime::GetGameTime().count();
|
||||
time_t timeDiff = currTime - _restTime;
|
||||
if (timeDiff >= 10) // freeze update
|
||||
{
|
||||
@@ -265,8 +263,8 @@ void Player::Update(uint32 p_time)
|
||||
|
||||
if (!IsPositionValid()) // pussywizard: will crash below at eg. GetZoneAndAreaId
|
||||
{
|
||||
LOG_INFO("misc", "Player::Update - invalid position (%.1f, %.1f, %.1f)! Map: %u, MapId: %u, %s",
|
||||
GetPositionX(), GetPositionY(), GetPositionZ(), (FindMap() ? FindMap()->GetId() : 0), GetMapId(), GetGUID().ToString().c_str());
|
||||
LOG_INFO("misc", "Player::Update - invalid position ({0:.1f}, {0:.1f}, {0:.1f})! Map: {}, MapId: {}, {}",
|
||||
GetPositionX(), GetPositionY(), GetPositionZ(), (FindMap() ? FindMap()->GetId() : 0), GetMapId(), GetGUID().ToString());
|
||||
GetSession()->KickPlayer("Invalid position");
|
||||
return;
|
||||
}
|
||||
@@ -315,35 +313,18 @@ void Player::Update(uint32 p_time)
|
||||
if (m_deathState == JUST_DIED)
|
||||
KillPlayer();
|
||||
|
||||
if (m_nextSave <= SavingSystemMgr::GetSavingCurrentValue() &&
|
||||
!GetSession()->isLogingOut())
|
||||
SaveToDB(false, false);
|
||||
else if (m_additionalSaveTimer && !GetSession()->isLogingOut()) // pussywizard:
|
||||
if (m_nextSave)
|
||||
{
|
||||
if (m_additionalSaveTimer <= p_time)
|
||||
if (p_time >= m_nextSave)
|
||||
{
|
||||
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
|
||||
if (m_additionalSaveMask & ADDITIONAL_SAVING_INVENTORY_AND_GOLD)
|
||||
SaveInventoryAndGoldToDB(trans);
|
||||
if (m_additionalSaveMask & ADDITIONAL_SAVING_QUEST_STATUS)
|
||||
{
|
||||
_SaveQuestStatus(trans);
|
||||
|
||||
// xinef: if nothing changed, nothing will happen
|
||||
_SaveDailyQuestStatus(trans);
|
||||
_SaveWeeklyQuestStatus(trans);
|
||||
_SaveSeasonalQuestStatus(trans);
|
||||
_SaveMonthlyQuestStatus(trans);
|
||||
}
|
||||
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
m_additionalSaveTimer = 0;
|
||||
m_additionalSaveMask = 0;
|
||||
// m_nextSave reset in SaveToDB call
|
||||
SaveToDB(false, false);
|
||||
LOG_DEBUG("entities.player", "Player::Update: Player '{}' ({}) saved", GetName(), GetGUID().ToString());
|
||||
}
|
||||
else
|
||||
m_additionalSaveTimer -= p_time;
|
||||
{
|
||||
m_nextSave -= p_time;
|
||||
}
|
||||
}
|
||||
|
||||
// Handle Water/drowning
|
||||
@@ -439,17 +420,7 @@ void Player::Update(uint32 p_time)
|
||||
RemoveFromNotify(NOTIFY_VISIBILITY_CHANGED);
|
||||
}
|
||||
|
||||
#ifdef PLAYERBOTS
|
||||
if (_playerbotAI)
|
||||
{
|
||||
_playerbotAI->UpdateAI(p_time);
|
||||
}
|
||||
|
||||
if (_playerbotMgr)
|
||||
{
|
||||
_playerbotMgr->UpdateAI(p_time);
|
||||
}
|
||||
#endif
|
||||
sScriptMgr->OnAfterPlayerUpdate(this, p_time);
|
||||
}
|
||||
|
||||
void Player::UpdateMirrorTimers()
|
||||
@@ -462,32 +433,32 @@ void Player::UpdateMirrorTimers()
|
||||
void Player::UpdateNextMailTimeAndUnreads()
|
||||
{
|
||||
// Update the next delivery time and unread mails
|
||||
time_t cTime = time(nullptr);
|
||||
time_t cTime = GameTime::GetGameTime().count();
|
||||
// Get the next delivery time
|
||||
CharacterDatabasePreparedStatement* stmtNextDeliveryTime =
|
||||
CharacterDatabase.GetPreparedStatement(CHAR_SEL_NEXT_MAIL_DELIVERYTIME);
|
||||
stmtNextDeliveryTime->setUInt32(0, GetGUID().GetCounter());
|
||||
stmtNextDeliveryTime->setUInt32(1, uint32(cTime));
|
||||
stmtNextDeliveryTime->SetData(0, GetGUID().GetCounter());
|
||||
stmtNextDeliveryTime->SetData(1, uint32(cTime));
|
||||
PreparedQueryResult resultNextDeliveryTime =
|
||||
CharacterDatabase.Query(stmtNextDeliveryTime);
|
||||
if (resultNextDeliveryTime)
|
||||
{
|
||||
Field* fields = resultNextDeliveryTime->Fetch();
|
||||
m_nextMailDelivereTime = time_t(fields[0].GetUInt32());
|
||||
m_nextMailDelivereTime = time_t(fields[0].Get<uint32>());
|
||||
}
|
||||
|
||||
// Get unread mails count
|
||||
CharacterDatabasePreparedStatement* stmtUnreadAmount =
|
||||
CharacterDatabase.GetPreparedStatement(
|
||||
CHAR_SEL_CHARACTER_MAILCOUNT_UNREAD_SYNCH);
|
||||
stmtUnreadAmount->setUInt32(0, GetGUID().GetCounter());
|
||||
stmtUnreadAmount->setUInt32(1, uint32(cTime));
|
||||
stmtUnreadAmount->SetData(0, GetGUID().GetCounter());
|
||||
stmtUnreadAmount->SetData(1, uint32(cTime));
|
||||
PreparedQueryResult resultUnreadAmount =
|
||||
CharacterDatabase.Query(stmtUnreadAmount);
|
||||
if (resultUnreadAmount)
|
||||
{
|
||||
Field* fields = resultUnreadAmount->Fetch();
|
||||
unReadMails = uint8(fields[0].GetUInt64());
|
||||
unReadMails = uint8(fields[0].Get<uint64>());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -753,7 +724,7 @@ bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue,
|
||||
uint32 RedLevel, uint32 Multiplicator)
|
||||
{
|
||||
LOG_DEBUG("entities.player.skills",
|
||||
"UpdateGatherSkill(SkillId %d SkillLevel %d RedLevel %d)",
|
||||
"UpdateGatherSkill(SkillId {} SkillLevel {} RedLevel {})",
|
||||
SkillId, SkillValue, RedLevel);
|
||||
|
||||
uint32 gathering_skill_gain =
|
||||
@@ -812,7 +783,7 @@ bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue,
|
||||
|
||||
bool Player::UpdateCraftSkill(uint32 spellid)
|
||||
{
|
||||
LOG_DEBUG("entities.player.skills", "UpdateCraftSkill spellid %d", spellid);
|
||||
LOG_DEBUG("entities.player.skills", "UpdateCraftSkill spellid {}", spellid);
|
||||
|
||||
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellid);
|
||||
|
||||
@@ -901,7 +872,7 @@ static const size_t bonusSkillLevelsSize =
|
||||
bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
|
||||
{
|
||||
LOG_DEBUG("entities.player.skills",
|
||||
"UpdateSkillPro(SkillId %d, Chance %3.1f%%)", SkillId,
|
||||
"UpdateSkillPro(SkillId {}, Chance {:3.1f}%)", SkillId,
|
||||
Chance / 10.0f);
|
||||
if (!SkillId)
|
||||
return false;
|
||||
@@ -909,7 +880,7 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
|
||||
if (Chance <= 0) // speedup in 0 chance case
|
||||
{
|
||||
LOG_DEBUG("entities.player.skills",
|
||||
"Player::UpdateSkillPro Chance=%3.1f%% missed",
|
||||
"Player::UpdateSkillPro Chance={:3.1f}% missed",
|
||||
Chance / 10.0f);
|
||||
return false;
|
||||
}
|
||||
@@ -952,13 +923,13 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
|
||||
UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL,
|
||||
SkillId);
|
||||
LOG_DEBUG("entities.player.skills",
|
||||
"Player::UpdateSkillPro Chance=%3.1f%% taken",
|
||||
"Player::UpdateSkillPro Chance={:3.1f}% taken",
|
||||
Chance / 10.0f);
|
||||
return true;
|
||||
}
|
||||
|
||||
LOG_DEBUG("entities.player.skills",
|
||||
"Player::UpdateSkillPro Chance=%3.1f%% missed", Chance / 10.0f);
|
||||
"Player::UpdateSkillPro Chance={:3.1f}% missed", Chance / 10.0f);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1131,6 +1102,15 @@ bool Player::UpdatePosition(float x, float y, float z, float orientation,
|
||||
if (!Unit::UpdatePosition(x, y, z, orientation, teleport))
|
||||
return false;
|
||||
|
||||
// Update player zone if needed
|
||||
if (m_needZoneUpdate)
|
||||
{
|
||||
uint32 newZone, newArea;
|
||||
GetZoneAndAreaId(newZone, newArea);
|
||||
UpdateZone(newZone, newArea);
|
||||
m_needZoneUpdate = false;
|
||||
}
|
||||
|
||||
if (GetGroup())
|
||||
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
|
||||
|
||||
@@ -1145,8 +1125,8 @@ bool Player::UpdatePosition(float x, float y, float z, float orientation,
|
||||
void Player::UpdateHonorFields()
|
||||
{
|
||||
/// called when rewarding honor and at each save
|
||||
time_t now = time_t(time(nullptr));
|
||||
time_t today = time_t(time(nullptr) / DAY) * DAY;
|
||||
time_t now = time_t(GameTime::GetGameTime().count());
|
||||
time_t today = time_t(GameTime::GetGameTime().count() / DAY) * DAY;
|
||||
|
||||
if (m_lastHonorUpdateTime < today)
|
||||
{
|
||||
@@ -1384,9 +1364,9 @@ void Player::UpdateHomebindTime(uint32 time)
|
||||
GetSession()->SendPacket(&data);
|
||||
LOG_DEBUG(
|
||||
"maps",
|
||||
"PLAYER: Player '%s' (%s) will be teleported to homebind in 60 "
|
||||
"PLAYER: Player '{}' ({}) will be teleported to homebind in 60 "
|
||||
"seconds",
|
||||
GetName().c_str(), GetGUID().ToString().c_str());
|
||||
GetName(), GetGUID().ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1403,7 +1383,7 @@ void Player::UpdatePvPState()
|
||||
{
|
||||
if (IsPvP() && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP) &&
|
||||
pvpInfo.EndTimer == 0)
|
||||
pvpInfo.EndTimer = time(nullptr); // start toggle-off
|
||||
pvpInfo.EndTimer = GameTime::GetGameTime().count(); // start toggle-off
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1469,7 +1449,7 @@ void Player::UpdateFFAPvPState(bool reset /*= true*/)
|
||||
!pvpInfo.FFAPvPEndTimer)
|
||||
{
|
||||
pvpInfo.FFAPvPEndTimer =
|
||||
sWorld->GetGameTime() +
|
||||
GameTime::GetGameTime().count() +
|
||||
sWorld->getIntConfig(CONFIG_FFA_PVP_TIMER);
|
||||
}
|
||||
}
|
||||
@@ -1485,7 +1465,7 @@ void Player::UpdatePvP(bool state, bool _override)
|
||||
}
|
||||
else
|
||||
{
|
||||
pvpInfo.EndTimer = time(nullptr);
|
||||
pvpInfo.EndTimer = GameTime::GetGameTime().count();
|
||||
SetPvP(state);
|
||||
}
|
||||
|
||||
@@ -1526,107 +1506,6 @@ void Player::UpdatePotionCooldown(Spell* spell)
|
||||
SetLastPotionId(0);
|
||||
}
|
||||
|
||||
void Player::UpdateCinematicLocation(uint32 /*diff*/)
|
||||
{
|
||||
Position lastPosition;
|
||||
uint32 lastTimestamp = 0;
|
||||
Position nextPosition;
|
||||
uint32 nextTimestamp = 0;
|
||||
|
||||
if (m_cinematicCamera->size() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Obtain direction of travel
|
||||
for (FlyByCamera cam : *m_cinematicCamera)
|
||||
{
|
||||
if (cam.timeStamp > m_cinematicDiff)
|
||||
{
|
||||
nextPosition = Position(cam.locations.x, cam.locations.y,
|
||||
cam.locations.z, cam.locations.w);
|
||||
nextTimestamp = cam.timeStamp;
|
||||
break;
|
||||
}
|
||||
lastPosition = Position(cam.locations.x, cam.locations.y,
|
||||
cam.locations.z, cam.locations.w);
|
||||
lastTimestamp = cam.timeStamp;
|
||||
}
|
||||
float angle = lastPosition.GetAngle(&nextPosition);
|
||||
angle -= lastPosition.GetOrientation();
|
||||
if (angle < 0)
|
||||
{
|
||||
angle += 2 * float(M_PI);
|
||||
}
|
||||
|
||||
// Look for position around 2 second ahead of us.
|
||||
int32 workDiff = m_cinematicDiff;
|
||||
|
||||
// Modify result based on camera direction (Humans for example, have the
|
||||
// camera point behind)
|
||||
workDiff += static_cast<int32>(float(CINEMATIC_LOOKAHEAD) * cos(angle));
|
||||
|
||||
// Get an iterator to the last entry in the cameras, to make sure we don't
|
||||
// go beyond the end
|
||||
FlyByCameraCollection::const_reverse_iterator endItr =
|
||||
m_cinematicCamera->rbegin();
|
||||
if (endItr != m_cinematicCamera->rend() &&
|
||||
workDiff > static_cast<int32>(endItr->timeStamp))
|
||||
{
|
||||
workDiff = endItr->timeStamp;
|
||||
}
|
||||
|
||||
// Never try to go back in time before the start of cinematic!
|
||||
if (workDiff < 0)
|
||||
{
|
||||
workDiff = m_cinematicDiff;
|
||||
}
|
||||
|
||||
// Obtain the previous and next waypoint based on timestamp
|
||||
for (FlyByCamera cam : *m_cinematicCamera)
|
||||
{
|
||||
if (static_cast<int32>(cam.timeStamp) >= workDiff)
|
||||
{
|
||||
nextPosition = Position(cam.locations.x, cam.locations.y,
|
||||
cam.locations.z, cam.locations.w);
|
||||
nextTimestamp = cam.timeStamp;
|
||||
break;
|
||||
}
|
||||
lastPosition = Position(cam.locations.x, cam.locations.y,
|
||||
cam.locations.z, cam.locations.w);
|
||||
lastTimestamp = cam.timeStamp;
|
||||
}
|
||||
|
||||
// Never try to go beyond the end of the cinematic
|
||||
if (workDiff > static_cast<int32>(nextTimestamp))
|
||||
{
|
||||
workDiff = static_cast<int32>(nextTimestamp);
|
||||
}
|
||||
|
||||
// Interpolate the position for this moment in time (or the adjusted moment
|
||||
// in time)
|
||||
uint32 timeDiff = nextTimestamp - lastTimestamp;
|
||||
uint32 interDiff = workDiff - lastTimestamp;
|
||||
float xDiff = nextPosition.m_positionX - lastPosition.m_positionX;
|
||||
float yDiff = nextPosition.m_positionY - lastPosition.m_positionY;
|
||||
float zDiff = nextPosition.m_positionZ - lastPosition.m_positionZ;
|
||||
Position interPosition(lastPosition.m_positionX +
|
||||
(xDiff * (float(interDiff) / float(timeDiff))),
|
||||
lastPosition.m_positionY +
|
||||
(yDiff * (float(interDiff) / float(timeDiff))),
|
||||
lastPosition.m_positionZ +
|
||||
(zDiff * (float(interDiff) / float(timeDiff))));
|
||||
|
||||
// Advance (at speed) to this position. The remote sight object is used
|
||||
// to send update information to player in cinematic
|
||||
if (m_CinematicObject && interPosition.IsPositionValid())
|
||||
{
|
||||
m_CinematicObject->MonsterMoveWithSpeed(
|
||||
interPosition.m_positionX, interPosition.m_positionY,
|
||||
interPosition.m_positionZ, 200.0f);
|
||||
}
|
||||
}
|
||||
|
||||
template void Player::UpdateVisibilityOf(Player* target, UpdateData& data,
|
||||
std::vector<Unit*>& visibleNow);
|
||||
template void Player::UpdateVisibilityOf(Creature* target, UpdateData& data,
|
||||
@@ -1977,7 +1856,7 @@ void Player::UpdateCorpseReclaimDelay()
|
||||
(!pvp && !sWorld->getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE)))
|
||||
return;
|
||||
|
||||
time_t now = time(nullptr);
|
||||
time_t now = GameTime::GetGameTime().count();
|
||||
|
||||
if (now < m_deathExpireTime)
|
||||
{
|
||||
@@ -2253,11 +2132,11 @@ void Player::UpdateSpecCount(uint8 count)
|
||||
itr != m_actionButtons.end(); ++itr)
|
||||
{
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_ACTION);
|
||||
stmt->setUInt32(0, GetGUID().GetCounter());
|
||||
stmt->setUInt8(1, 1);
|
||||
stmt->setUInt8(2, itr->first);
|
||||
stmt->setUInt32(3, itr->second.GetAction());
|
||||
stmt->setUInt8(4, uint8(itr->second.GetType()));
|
||||
stmt->SetData(0, GetGUID().GetCounter());
|
||||
stmt->SetData(1, 1);
|
||||
stmt->SetData(2, itr->first);
|
||||
stmt->SetData(3, itr->second.GetAction());
|
||||
stmt->SetData(4, uint8(itr->second.GetType()));
|
||||
trans->Append(stmt);
|
||||
}
|
||||
}
|
||||
@@ -2268,8 +2147,8 @@ void Player::UpdateSpecCount(uint8 count)
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(
|
||||
CHAR_DEL_CHAR_ACTION_EXCEPT_SPEC);
|
||||
stmt->setUInt8(0, m_activeSpec);
|
||||
stmt->setUInt32(1, GetGUID().GetCounter());
|
||||
stmt->SetData(0, m_activeSpec);
|
||||
stmt->SetData(1, GetGUID().GetCounter());
|
||||
trans->Append(stmt);
|
||||
|
||||
m_activeSpec = 0;
|
||||
@@ -2282,12 +2161,12 @@ void Player::UpdateSpecCount(uint8 count)
|
||||
SendTalentsInfoData(false);
|
||||
}
|
||||
|
||||
void Player::SendUpdateWorldState(uint32 Field, uint32 Value)
|
||||
void Player::SendUpdateWorldState(uint32 variable, uint32 value) const
|
||||
{
|
||||
WorldPacket data(SMSG_UPDATE_WORLD_STATE, 8);
|
||||
data << Field;
|
||||
data << Value;
|
||||
GetSession()->SendPacket(&data);
|
||||
WorldPackets::WorldState::UpdateWorldState worldstate;
|
||||
worldstate.VariableID = variable;
|
||||
worldstate.Value = value;
|
||||
SendDirectMessage(worldstate.Write());
|
||||
}
|
||||
|
||||
void Player::ProcessTerrainStatusUpdate()
|
||||
|
||||
Reference in New Issue
Block a user