Core/Game: Fix remaining warnings on windows (and most likely almost all of the ones on *nix)
--HG-- branch : trunk
This commit is contained in:
@@ -164,7 +164,7 @@ uint32 AccountMgr::GetSecurity(uint32 acc_id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 AccountMgr::GetSecurity(uint32 acc_id, int32 realm_id)
|
||||
uint32 AccountMgr::GetSecurity(uint64 acc_id, int32 realm_id)
|
||||
{
|
||||
QueryResult_AutoPtr result = (realm_id == -1)
|
||||
? LoginDatabase.PQuery("SELECT gmlevel FROM account_access WHERE id = '%u' AND RealmID = '%d'", acc_id, realm_id)
|
||||
|
||||
@@ -51,7 +51,7 @@ class AccountMgr
|
||||
|
||||
uint32 GetId(std::string username);
|
||||
uint32 GetSecurity(uint32 acc_id);
|
||||
uint32 GetSecurity(uint32 acc_id, int32 realm_id);
|
||||
uint32 GetSecurity(uint64 acc_id, int32 realm_id);
|
||||
bool GetName(uint32 acc_id, std::string &name);
|
||||
uint32 GetCharactersCount(uint32 acc_id);
|
||||
std::string CalculateShaPassHash(std::string& name, std::string& password);
|
||||
|
||||
@@ -491,7 +491,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(const char* args)
|
||||
|
||||
if (target)
|
||||
{
|
||||
int32 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
int32 curRespawnDelay = int32(target->GetRespawnTimeEx()-time(NULL));
|
||||
if (curRespawnDelay < 0)
|
||||
curRespawnDelay = 0;
|
||||
|
||||
|
||||
@@ -4345,10 +4345,10 @@ bool ChatHandler::HandleNpcInfoCommand(const char* /*args*/)
|
||||
uint32 Entry = target->GetEntry();
|
||||
CreatureInfo const* cInfo = target->GetCreatureInfo();
|
||||
|
||||
int32 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
int64 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
if (curRespawnDelay < 0)
|
||||
curRespawnDelay = 0;
|
||||
std::string curRespawnDelayStr = secsToTimeString(curRespawnDelay,true);
|
||||
std::string curRespawnDelayStr = secsToTimeString(uint64(curRespawnDelay),true);
|
||||
std::string defRespawnDelayStr = secsToTimeString(target->GetRespawnDelay(),true);
|
||||
|
||||
PSendSysMessage(LANG_NPCINFO_CHAR, target->GetDBTableGUIDLow(), faction, npcflags, Entry, displayid, nativeid);
|
||||
@@ -5711,7 +5711,7 @@ bool ChatHandler::HandleBanInfoHelper(uint32 accountid, char const* accountname)
|
||||
if (fields[2].GetBool() && (fields[1].GetUInt64() == (uint64)0 ||unbandate >= time(NULL)))
|
||||
active = true;
|
||||
bool permanent = (fields[1].GetUInt64() == (uint64)0);
|
||||
std::string bantime = permanent?GetTrinityString(LANG_BANINFO_INFINITE):secsToTimeString(fields[1].GetUInt64(), true);
|
||||
std::string bantime = permanent ? GetTrinityString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].GetUInt64(), true);
|
||||
PSendSysMessage(LANG_BANINFO_HISTORYENTRY,
|
||||
fields[0].GetString(), bantime.c_str(), active ? GetTrinityString(LANG_BANINFO_YES):GetTrinityString(LANG_BANINFO_NO), fields[4].GetString(), fields[5].GetString());
|
||||
}while (result->NextRow());
|
||||
@@ -6154,7 +6154,7 @@ bool ChatHandler::HandlePDumpWriteCommand(const char *args)
|
||||
return false;
|
||||
}
|
||||
|
||||
switch(PlayerDumpWriter().WriteDump(file, guid))
|
||||
switch(PlayerDumpWriter().WriteDump(file, uint32(guid)))
|
||||
{
|
||||
case DUMP_SUCCESS:
|
||||
PSendSysMessage(LANG_COMMAND_EXPORT_SUCCESS);
|
||||
@@ -6550,9 +6550,9 @@ bool ChatHandler::HandleCastSelfCommand(const char *args)
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string GetTimeString(uint32 time)
|
||||
std::string GetTimeString(uint64 time)
|
||||
{
|
||||
uint16 days = time / DAY, hours = (time % DAY) / HOUR, minute = (time % HOUR) / MINUTE;
|
||||
uint64 days = time / DAY, hours = (time % DAY) / HOUR, minute = (time % HOUR) / MINUTE;
|
||||
std::ostringstream ss;
|
||||
if (days) ss << days << "d ";
|
||||
if (hours) ss << hours << "h ";
|
||||
|
||||
@@ -1568,7 +1568,7 @@ void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player *player)
|
||||
}
|
||||
|
||||
// Not give XP in case already completed once repeatable quest
|
||||
uint32 XP = qReward->XPValue(player) * sWorld.getRate(RATE_XP_QUEST);
|
||||
uint32 XP = uint32(qReward->XPValue(player) * sWorld.getRate(RATE_XP_QUEST));
|
||||
|
||||
XP += (5 - group->GetMembersCount()) * reward->reward[index].variableXP;
|
||||
|
||||
|
||||
@@ -1143,7 +1143,7 @@ void Item::UpdatePlayedTime(Player *owner)
|
||||
uint32 current_playtime = GetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME);
|
||||
// Calculate time elapsed since last played time update
|
||||
time_t curtime = time(NULL);
|
||||
uint32 elapsed = curtime - m_lastPlayedTimeUpdate;
|
||||
uint32 elapsed = uint32(curtime - m_lastPlayedTimeUpdate);
|
||||
uint32 new_playtime = current_playtime + elapsed;
|
||||
// Check if the refund timer has expired yet
|
||||
if (new_playtime <= 2*HOUR)
|
||||
@@ -1164,7 +1164,7 @@ void Item::UpdatePlayedTime(Player *owner)
|
||||
uint32 Item::GetPlayedTime()
|
||||
{
|
||||
time_t curtime = time(NULL);
|
||||
uint32 elapsed = curtime - m_lastPlayedTimeUpdate;
|
||||
uint32 elapsed = uint32(curtime - m_lastPlayedTimeUpdate);
|
||||
return GetUInt32Value(ITEM_FIELD_CREATE_PLAYED_TIME) + elapsed;
|
||||
}
|
||||
|
||||
|
||||
@@ -1988,7 +1988,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
|
||||
pet->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000);
|
||||
pet->SetFullHealth();
|
||||
pet->SetPower(POWER_MANA, pet->GetMaxPower(POWER_MANA));
|
||||
pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, time(NULL));
|
||||
pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); // cast can't be helped in this case
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -229,7 +229,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
|
||||
break;
|
||||
}
|
||||
|
||||
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, time(NULL));
|
||||
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); // cast can't be helped here
|
||||
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, fields[5].GetUInt32());
|
||||
SetCreatorGUID(owner->GetGUID());
|
||||
|
||||
@@ -293,7 +293,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
|
||||
m_resetTalentsTime = fields[16].GetUInt64();
|
||||
InitTalentForLevel(); // set original talents points before spell loading
|
||||
|
||||
uint32 timediff = (time(NULL) - fields[14].GetUInt32());
|
||||
uint32 timediff = uint32(time(NULL) - fields[14].GetUInt32());
|
||||
_LoadAuras(timediff);
|
||||
|
||||
// load action bar, if data broken will fill later by default spells.
|
||||
@@ -1102,7 +1102,7 @@ void Pet::_LoadSpellCooldowns()
|
||||
{
|
||||
time_t curTime = time(NULL);
|
||||
|
||||
WorldPacket data(SMSG_SPELL_COOLDOWN, (8+1+result->GetRowCount()*8));
|
||||
WorldPacket data(SMSG_SPELL_COOLDOWN, size_t(8+1+result->GetRowCount()*8));
|
||||
data << GetGUID();
|
||||
data << uint8(0x0); // flags (0x1, 0x2)
|
||||
|
||||
@@ -1777,7 +1777,7 @@ void Pet::InitTalentForLevel()
|
||||
|
||||
uint32 Pet::resetTalentsCost() const
|
||||
{
|
||||
uint32 days = (sWorld.GetGameTime() - m_resetTalentsTime)/DAY;
|
||||
int64 days = int64(sWorld.GetGameTime() - m_resetTalentsTime)/DAY;
|
||||
|
||||
// The first time reset costs 10 silver; after 1 day cost is reset to 10 silver
|
||||
if (m_resetTalentsCost < 10*SILVER || days > 0)
|
||||
|
||||
@@ -384,8 +384,17 @@ void TradeData::SetAccepted(bool state, bool crosssend /*= false*/)
|
||||
|
||||
UpdateMask Player::updateVisualBits;
|
||||
|
||||
// we can disable this warning for this since it only
|
||||
// causes undefined behavior when passed to the base class constructor
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4355)
|
||||
#endif
|
||||
Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputationMgr(this)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default:4355)
|
||||
#endif
|
||||
|
||||
m_speakTime = 0;
|
||||
m_speakCount = 0;
|
||||
|
||||
@@ -1391,7 +1400,7 @@ void Player::Update(uint32 p_time)
|
||||
{
|
||||
if (roll_chance_i(3) && GetTimeInnEnter() > 0) // freeze update
|
||||
{
|
||||
int time_inn = time(NULL)-GetTimeInnEnter();
|
||||
time_t time_inn = time(NULL)-GetTimeInnEnter();
|
||||
if (time_inn >= 10) // freeze update
|
||||
{
|
||||
float bubble = 0.125f*sWorld.getRate(RATE_REST_INGAME);
|
||||
@@ -3987,11 +3996,11 @@ uint32 Player::resetTalentsCost() const
|
||||
return 10*GOLD;
|
||||
else
|
||||
{
|
||||
uint32 months = (sWorld.GetGameTime() - m_resetTalentsTime)/MONTH;
|
||||
uint64 months = (sWorld.GetGameTime() - m_resetTalentsTime)/MONTH;
|
||||
if (months > 0)
|
||||
{
|
||||
// This cost will be reduced by a rate of 5 gold per month
|
||||
int32 new_cost = int32(m_resetTalentsCost) - 5*GOLD*months;
|
||||
int32 new_cost = int32(m_resetTalentsCost - 5*GOLD*months);
|
||||
// to a minimum of 10 gold.
|
||||
return (new_cost < 10*GOLD ? 10*GOLD : new_cost);
|
||||
}
|
||||
@@ -17028,7 +17037,7 @@ void Player::_LoadQuestStatus(QueryResult_AutoPtr result)
|
||||
if (quest_time <= sWorld.GetGameTime())
|
||||
questStatusData.m_timer = 1;
|
||||
else
|
||||
questStatusData.m_timer = (quest_time - sWorld.GetGameTime()) * IN_MILLISECONDS;
|
||||
questStatusData.m_timer = uint32((quest_time - sWorld.GetGameTime()) * IN_MILLISECONDS);
|
||||
}
|
||||
else
|
||||
quest_time = 0;
|
||||
@@ -17051,7 +17060,7 @@ void Player::_LoadQuestStatus(QueryResult_AutoPtr result)
|
||||
questStatusData.m_status == QUEST_STATUS_FAILED) &&
|
||||
(!questStatusData.m_rewarded || pQuest->IsRepeatable())))
|
||||
{
|
||||
SetQuestSlot(slot, quest_id, quest_time);
|
||||
SetQuestSlot(slot, quest_id, uint32(quest_time)); // cast can't be helped
|
||||
|
||||
if (questStatusData.m_status == QUEST_STATUS_COMPLETE)
|
||||
SetQuestSlotState(slot, QUEST_STATE_COMPLETE);
|
||||
@@ -22026,7 +22035,7 @@ uint32 Player::GetCorpseReclaimDelay(bool pvp) const
|
||||
time_t now = time(NULL);
|
||||
// 0..2 full period
|
||||
// should be ceil(x)-1 but not floor(x)
|
||||
uint32 count = (now < m_deathExpireTime - 1) ? (m_deathExpireTime - 1 - now)/DEATH_EXPIRE_STEP : 0;
|
||||
uint64 count = (now < m_deathExpireTime - 1) ? (m_deathExpireTime - 1 - now)/DEATH_EXPIRE_STEP : 0;
|
||||
return copseReclaimDelay[count];
|
||||
}
|
||||
|
||||
@@ -22042,7 +22051,7 @@ void Player::UpdateCorpseReclaimDelay()
|
||||
if (now < m_deathExpireTime)
|
||||
{
|
||||
// full and partly periods 1..3
|
||||
uint32 count = (m_deathExpireTime - now)/DEATH_EXPIRE_STEP +1;
|
||||
uint64 count = (m_deathExpireTime - now)/DEATH_EXPIRE_STEP +1;
|
||||
if (count < MAX_DEATH_COUNT)
|
||||
m_deathExpireTime = now+(count+1)*DEATH_EXPIRE_STEP;
|
||||
else
|
||||
@@ -22064,13 +22073,13 @@ void Player::SendCorpseReclaimDelay(bool load)
|
||||
else
|
||||
pvp = (m_ExtraFlags & PLAYER_EXTRA_PVP_DEATH);
|
||||
|
||||
uint32 delay;
|
||||
time_t delay;
|
||||
if (load)
|
||||
{
|
||||
if (corpse->GetGhostTime() > m_deathExpireTime)
|
||||
return;
|
||||
|
||||
uint32 count;
|
||||
uint64 count;
|
||||
if ((pvp && sWorld.getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP)) ||
|
||||
(!pvp && sWorld.getBoolConfig(CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE)))
|
||||
{
|
||||
|
||||
@@ -1084,7 +1084,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
|
||||
void setDeathState(DeathState s); // overwrite Unit::setDeathState
|
||||
|
||||
void InnEnter (int time,uint32 mapid, float x,float y,float z)
|
||||
void InnEnter (time_t time,uint32 mapid, float x,float y,float z)
|
||||
{
|
||||
inn_pos_mapid = mapid;
|
||||
inn_pos_x = x;
|
||||
@@ -1104,8 +1104,8 @@ class Player : public Unit, public GridObject<Player>
|
||||
float GetInnPosY() const { return inn_pos_y; }
|
||||
float GetInnPosZ() const { return inn_pos_z; }
|
||||
|
||||
int GetTimeInnEnter() const { return time_inn_enter; }
|
||||
void UpdateInnerTime (int time) { time_inn_enter = time; }
|
||||
time_t GetTimeInnEnter() const { return time_inn_enter; }
|
||||
void UpdateInnerTime (time_t time) { time_inn_enter = time; }
|
||||
|
||||
Pet* GetPet() const;
|
||||
Pet* SummonPet(uint32 entry, float x, float y, float z, float ang, PetType petType, uint32 despwtime);
|
||||
@@ -1614,7 +1614,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
{
|
||||
SpellCooldowns::const_iterator itr = m_spellCooldowns.find(spell_id);
|
||||
time_t t = time(NULL);
|
||||
return itr != m_spellCooldowns.end() && itr->second.end > t ? itr->second.end - t : 0;
|
||||
return uint32(itr != m_spellCooldowns.end() && itr->second.end > t ? itr->second.end - t : 0);
|
||||
}
|
||||
void AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 itemId, Spell* spell = NULL, bool infinityCooldown = false);
|
||||
void AddSpellCooldown(uint32 spell_id, uint32 itemid, time_t end_time);
|
||||
@@ -2574,7 +2574,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
float m_ammoDPS;
|
||||
|
||||
////////////////////Rest System/////////////////////
|
||||
int time_inn_enter;
|
||||
time_t time_inn_enter;
|
||||
uint32 inn_pos_mapid;
|
||||
float inn_pos_x;
|
||||
float inn_pos_y;
|
||||
|
||||
@@ -93,13 +93,20 @@ static bool isAlwaysTriggeredAura[TOTAL_AURAS];
|
||||
// Prepare lists
|
||||
static bool procPrepared = InitTriggerAuraData();
|
||||
|
||||
// we can disable this warning for this since it only
|
||||
// causes undefined behavior when passed to the base class constructor
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4355)
|
||||
#endif
|
||||
Unit::Unit(): WorldObject(),
|
||||
m_movedPlayer(NULL), IsAIEnabled(false), NeedChangeAI(false),
|
||||
m_ControlledByPlayer(false), i_AI(NULL), i_disabledAI(NULL), m_procDeep(0),
|
||||
m_removedAurasCount(0), i_motionMaster(this), m_ThreatManager(this),
|
||||
m_vehicle(NULL), m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE),
|
||||
m_HostileRefManager(this)
|
||||
m_removedAurasCount(0), m_vehicle(NULL), m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE),
|
||||
m_ThreatManager(this), i_motionMaster(this), m_HostileRefManager(this)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(default:4355)
|
||||
#endif
|
||||
m_objectType |= TYPEMASK_UNIT;
|
||||
m_objectTypeId = TYPEID_UNIT;
|
||||
|
||||
@@ -15668,7 +15675,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type)
|
||||
GetCharmInfo()->SetPetNumber(sObjectMgr.GeneratePetNumber(), true);
|
||||
|
||||
//if charmed two demons the same session, the 2nd gets the 1st one's name
|
||||
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, time(NULL));
|
||||
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); // cast can't be helped
|
||||
}
|
||||
}
|
||||
charmer->ToPlayer()->CharmSpellInitialize();
|
||||
|
||||
@@ -569,7 +569,7 @@ void InstanceSaveManager::Update()
|
||||
{
|
||||
// global reset/warning for a certain map
|
||||
time_t resetTime = GetResetTimeFor(event.mapid,event.difficulty);
|
||||
_ResetOrWarnAll(event.mapid, event.difficulty, event.type != 4, resetTime - now);
|
||||
_ResetOrWarnAll(event.mapid, event.difficulty, event.type != 4, uint32(resetTime - now));
|
||||
if (event.type != 4)
|
||||
{
|
||||
// schedule the next warning/reset
|
||||
|
||||
@@ -216,9 +216,9 @@ Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode, Map* _par
|
||||
i_mapEntry (sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId),
|
||||
m_unloadTimer(0), m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE),
|
||||
m_VisibilityNotifyPeriod(DEFAULT_VISIBILITY_NOTIFY_PERIOD),
|
||||
m_activeNonPlayersIter(m_activeNonPlayers.end()), i_gridExpiry(expiry),
|
||||
m_parentMap(_parent ? _parent : this), i_scriptLock(false)
|
||||
m_activeNonPlayersIter(m_activeNonPlayers.end()), i_gridExpiry(expiry), i_scriptLock(false)
|
||||
{
|
||||
m_parentMap = (_parent ? _parent : this);
|
||||
for (unsigned int idx=0; idx < MAX_NUMBER_OF_GRIDS; ++idx)
|
||||
{
|
||||
for (unsigned int j=0; j < MAX_NUMBER_OF_GRIDS; ++j)
|
||||
@@ -2966,9 +2966,6 @@ void Map::ScriptsProcess()
|
||||
case HIGHGUID_PET:
|
||||
source = HashMapHolder<Pet>::Find(step.sourceGUID);
|
||||
break;
|
||||
//case HIGHGUID_VEHICLE:
|
||||
// source = HashMapHolder<Vehicle>::Find(step.sourceGUID);
|
||||
// break;
|
||||
case HIGHGUID_PLAYER:
|
||||
source = HashMapHolder<Player>::Find(step.sourceGUID);
|
||||
break;
|
||||
|
||||
@@ -485,11 +485,10 @@ void WorldSession::HandleZoneUpdateOpcode(WorldPacket & recv_data)
|
||||
|
||||
void WorldSession::HandleSetTargetOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
// When this packet send?
|
||||
uint64 guid ;
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
_player->SetUInt32Value(UNIT_FIELD_TARGET, guid);
|
||||
_player->SetUInt32Value(UNIT_FIELD_TARGET, uint32(guid));
|
||||
|
||||
// update reputation list if need
|
||||
Unit* unit = ObjectAccessor::GetUnit(*_player, guid);
|
||||
|
||||
@@ -614,7 +614,7 @@ void WorldSession::HandlePetRename(WorldPacket & recv_data)
|
||||
trans->PAppend("UPDATE character_pet SET name = '%s', renamed = '1' WHERE owner = '%u' AND id = '%u'", name.c_str(), _player->GetGUIDLow(), pet->GetCharmInfo()->GetPetNumber());
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, time(NULL));
|
||||
pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); // cast can't be helped
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetAbandon(WorldPacket & recv_data)
|
||||
|
||||
@@ -866,7 +866,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
|
||||
Creature* creatureTarget = unitTarget->ToCreature();
|
||||
|
||||
m_caster->SummonGameObject(179644, creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), creatureTarget->GetOrientation(), 0, 0, 0, 0, creatureTarget->GetRespawnTime()-time(NULL));
|
||||
m_caster->SummonGameObject(179644, creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), creatureTarget->GetOrientation(), 0, 0, 0, 0, uint32(creatureTarget->GetRespawnTime()-time(NULL)));
|
||||
sLog.outDebug("SummonGameObject at SpellEfects.cpp EffectDummy for Spell 23019");
|
||||
|
||||
creatureTarget->ForcedDespawn();
|
||||
@@ -1424,7 +1424,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
if (m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_DK_DEATH_STRIKE)
|
||||
{
|
||||
uint32 count = unitTarget->GetDiseasesByCaster(m_caster->GetGUID());
|
||||
int32 bp = int32(count * m_caster->CountPctFromMaxHealth(m_spellInfo->EffectDamageMultiplier[0]));
|
||||
int32 bp = int32(count * m_caster->CountPctFromMaxHealth(int32(m_spellInfo->EffectDamageMultiplier[0])));
|
||||
// Improved Death Strike
|
||||
if (AuraEffect const * aurEff = m_caster->GetAuraEffect(SPELL_AURA_ADD_PCT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 2751, 0))
|
||||
bp = int32(bp * (m_caster->CalculateSpellDamage(m_caster, aurEff->GetSpellProto(), 2) + 100.0f) / 100.0f);
|
||||
|
||||
@@ -1909,13 +1909,13 @@ void World::Update(uint32 diff)
|
||||
if (m_timers[WUPDATE_WEATHERS].Passed())
|
||||
{
|
||||
m_timers[WUPDATE_WEATHERS].Reset();
|
||||
sWeatherMgr.Update(m_timers[WUPDATE_WEATHERS].GetInterval());
|
||||
sWeatherMgr.Update(uint32(m_timers[WUPDATE_WEATHERS].GetInterval()));
|
||||
}
|
||||
|
||||
/// <li> Update uptime table
|
||||
if (m_timers[WUPDATE_UPTIME].Passed())
|
||||
{
|
||||
uint32 tmpDiff = (m_gameTime - m_startTime);
|
||||
uint32 tmpDiff = uint32(m_gameTime - m_startTime);
|
||||
uint32 maxClientsNum = GetMaxActiveSessionCount();
|
||||
|
||||
m_timers[WUPDATE_UPTIME].Reset();
|
||||
|
||||
@@ -754,8 +754,8 @@ class World
|
||||
time_t m_startTime;
|
||||
time_t m_gameTime;
|
||||
IntervalTimer m_timers[WUPDATE_COUNT];
|
||||
uint32 mail_timer;
|
||||
uint32 mail_timer_expires;
|
||||
time_t mail_timer;
|
||||
time_t mail_timer_expires;
|
||||
uint32 m_updateTime, m_updateTimeSum;
|
||||
uint32 m_updateTimeCount;
|
||||
uint32 m_currentTime;
|
||||
|
||||
@@ -141,12 +141,12 @@ void stripLineInvisibleChars(std::string &str)
|
||||
|
||||
}
|
||||
|
||||
std::string secsToTimeString(uint32 timeInSecs, bool shortText, bool hoursOnly)
|
||||
std::string secsToTimeString(uint64 timeInSecs, bool shortText, bool hoursOnly)
|
||||
{
|
||||
uint32 secs = timeInSecs % MINUTE;
|
||||
uint32 minutes = timeInSecs % HOUR / MINUTE;
|
||||
uint32 hours = timeInSecs % DAY / HOUR;
|
||||
uint32 days = timeInSecs / DAY;
|
||||
uint64 secs = timeInSecs % MINUTE;
|
||||
uint64 minutes = timeInSecs % HOUR / MINUTE;
|
||||
uint64 hours = timeInSecs % DAY / HOUR;
|
||||
uint64 days = timeInSecs / DAY;
|
||||
|
||||
std::ostringstream ss;
|
||||
if(days)
|
||||
|
||||
@@ -32,7 +32,7 @@ Tokens StrSplit(const std::string &src, const std::string &sep);
|
||||
|
||||
void stripLineInvisibleChars(std::string &src);
|
||||
|
||||
std::string secsToTimeString(uint32 timeInSecs, bool shortText = false, bool hoursOnly = false);
|
||||
std::string secsToTimeString(uint64 timeInSecs, bool shortText = false, bool hoursOnly = false);
|
||||
uint32 TimeStringToSecs(const std::string& timestring);
|
||||
std::string TimeToTimestampStr(time_t t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user