mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10690] Fixed *nix build problem after recent commits.
This commit is contained in:
parent
bffc07e4bc
commit
2b98f699b7
5 changed files with 16 additions and 12 deletions
|
|
@ -117,12 +117,8 @@ class MANGOS_DLL_DECL Grid
|
|||
return i_container.template remove<SPECIFIC_OBJECT>(obj);
|
||||
}
|
||||
|
||||
uint32 SetLastUpdateTimeAndReturnDiff(uint32 newtime)
|
||||
{
|
||||
uint32 realdiff = getMSTimeDiff(m_LastUpdateTime,newtime);
|
||||
m_LastUpdateTime = newtime;
|
||||
return realdiff;
|
||||
}
|
||||
uint32 GetLastUpdateTime() const { return m_LastUpdateTime; }
|
||||
void SetLastUpdateTime(uint32 newtime) { m_LastUpdateTime = newtime; }
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
|
|
@ -563,7 +563,11 @@ void Map::Update(uint32 time_, uint32 diff)
|
|||
|
||||
uint32 realdiff = diff;
|
||||
if (loaded(cell.gridPair()) )
|
||||
realdiff = (*getNGrid(cell.GridX(),cell.GridY()))(cell.CellX(),cell.CellY()).SetLastUpdateTimeAndReturnDiff(time_);
|
||||
{
|
||||
GridType& celldata = (*getNGrid(cell.GridX(), cell.GridY()))(cell.CellX(), cell.CellY());
|
||||
uint32 realdiff = getMSTimeDiff(celldata.GetLastUpdateTime(), time_);
|
||||
celldata.SetLastUpdateTime(time_);
|
||||
}
|
||||
|
||||
MaNGOS::ObjectUpdater updater(realdiff, diff);
|
||||
// for creature
|
||||
|
|
@ -622,7 +626,11 @@ void Map::Update(uint32 time_, uint32 diff)
|
|||
|
||||
uint32 realdiff = diff;
|
||||
if (loaded(cell.gridPair()) )
|
||||
realdiff = (*getNGrid(cell.GridX(),cell.GridY()))(cell.CellX(),cell.CellY()).SetLastUpdateTimeAndReturnDiff(time_);
|
||||
{
|
||||
GridType& celldata = (*getNGrid(cell.GridX(), cell.GridY()))(cell.CellX(), cell.CellY());
|
||||
uint32 realdiff = getMSTimeDiff(celldata.GetLastUpdateTime(), time_);
|
||||
celldata.SetLastUpdateTime(time_);
|
||||
}
|
||||
|
||||
MaNGOS::ObjectUpdater updater(realdiff, diff);
|
||||
// for creature
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ void ObjectGridLoader::LoadN(void)
|
|||
loader.Load(i_grid(x, y), *this);
|
||||
|
||||
// setup last update time for loaded cell
|
||||
i_grid(x, y).SetLastUpdateTimeAndReturnDiff(updatetime);
|
||||
i_grid(x, y).SetLastUpdateTime(updatetime);
|
||||
}
|
||||
}
|
||||
DEBUG_LOG("%u GameObjects, %u Creatures, and %u Corpses/Bones loaded for grid %u on map %u", i_gameObjects, i_creatures, i_corpses,i_grid.GetGridId(), i_map->GetId());
|
||||
|
|
|
|||
|
|
@ -6061,7 +6061,7 @@ SpellCastResult Spell::CheckItems()
|
|||
if (item_prospectingskilllevel >p_caster->GetSkillValue(SKILL_JEWELCRAFTING))
|
||||
return SPELL_FAILED_LOW_CASTLEVEL;
|
||||
// make sure the player has the required ores in inventory
|
||||
if (m_targets.getItemTarget()->GetCount() < CalculateDamage(SpellEffectIndex(i), m_caster))
|
||||
if (int32(m_targets.getItemTarget()->GetCount()) < CalculateDamage(SpellEffectIndex(i), m_caster))
|
||||
return SPELL_FAILED_NEED_MORE_ITEMS;
|
||||
|
||||
if (!LootTemplates_Prospecting.HaveLootFor(m_targets.getItemTargetEntry()))
|
||||
|
|
@ -6084,7 +6084,7 @@ SpellCastResult Spell::CheckItems()
|
|||
if (item_millingskilllevel >p_caster->GetSkillValue(SKILL_INSCRIPTION))
|
||||
return SPELL_FAILED_LOW_CASTLEVEL;
|
||||
// make sure the player has the required herbs in inventory
|
||||
if (m_targets.getItemTarget()->GetCount() < CalculateDamage(SpellEffectIndex(i), m_caster))
|
||||
if (int32(m_targets.getItemTarget()->GetCount()) < CalculateDamage(SpellEffectIndex(i), m_caster))
|
||||
return SPELL_FAILED_NEED_MORE_ITEMS;
|
||||
|
||||
if(!LootTemplates_Milling.HaveLootFor(m_targets.getItemTargetEntry()))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10689"
|
||||
#define REVISION_NR "10690"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue