mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-28 03:40:54 +00:00
Fix coding guidelines + double initialized as 0.0
This commit is contained in:
parent
ad48baa3b1
commit
3e9ee0954b
8 changed files with 18 additions and 17 deletions
|
@ -1085,7 +1085,7 @@ void CGameItem::resetEnchantment()
|
||||||
_SapLoad = 0;
|
_SapLoad = 0;
|
||||||
_Enchantment.clear();
|
_Enchantment.clear();
|
||||||
contReset( _Enchantment );
|
contReset( _Enchantment );
|
||||||
_LatencyEndDate = 0.0f;
|
_LatencyEndDate = 0.0;
|
||||||
|
|
||||||
if (getInventory() != NULL)
|
if (getInventory() != NULL)
|
||||||
getInventory()->onItemChanged(getInventorySlot(), INVENTORIES::TItemChangeFlags(INVENTORIES::itc_enchant));
|
getInventory()->onItemChanged(getInventorySlot(), INVENTORIES::TItemChangeFlags(INVENTORIES::itc_enchant));
|
||||||
|
@ -1351,7 +1351,7 @@ void CGameItem::clear()
|
||||||
_Destroyable = true;
|
_Destroyable = true;
|
||||||
_Dropable = true;
|
_Dropable = true;
|
||||||
// _SlotImage = 0xFFFF;
|
// _SlotImage = 0xFFFF;
|
||||||
_LatencyEndDate = 0.0f;
|
_LatencyEndDate = 0.0;
|
||||||
// _Parent = NULL;
|
// _Parent = NULL;
|
||||||
_Inventory = NULL;
|
_Inventory = NULL;
|
||||||
_InventorySlot = INVENTORIES::INVALID_INVENTORY_SLOT;
|
_InventorySlot = INVENTORIES::INVALID_INVENTORY_SLOT;
|
||||||
|
|
|
@ -130,7 +130,7 @@ CCombatWeapon::CCombatWeapon(CGameItemPtr itemPtr)
|
||||||
// weapon hit rate is in hit/10s and we use ticks/hits....
|
// weapon hit rate is in hit/10s and we use ticks/hits....
|
||||||
if (itemPtr->hitRate() != 0)
|
if (itemPtr->hitRate() != 0)
|
||||||
{
|
{
|
||||||
LatencyInTicks = (10.0f / itemPtr->hitRate() ) / CTickEventHandler::getGameTimeStep();
|
LatencyInTicks = (10.0 / itemPtr->hitRate() ) / CTickEventHandler::getGameTimeStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
Quality = (uint16)itemPtr->recommended();
|
Quality = (uint16)itemPtr->recommended();
|
||||||
|
|
|
@ -111,7 +111,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void init()
|
void init()
|
||||||
{
|
{
|
||||||
LatencyInTicks = 0.0f;
|
LatencyInTicks = 0.0;
|
||||||
Damage = 0;
|
Damage = 0;
|
||||||
Quality = 0;
|
Quality = 0;
|
||||||
DmgType = DMGTYPE::UNDEFINED;
|
DmgType = DMGTYPE::UNDEFINED;
|
||||||
|
|
|
@ -382,7 +382,7 @@ void CCombatPhrase::init()
|
||||||
_CriticalHit = false;
|
_CriticalHit = false;
|
||||||
|
|
||||||
_ExecutionEndDate = 0;
|
_ExecutionEndDate = 0;
|
||||||
_LatencyEndDate = 0.0f;
|
_LatencyEndDate = 0.0;
|
||||||
|
|
||||||
_SabrinaCost = 0;
|
_SabrinaCost = 0;
|
||||||
_SabrinaRelativeCost = 1.0f;
|
_SabrinaRelativeCost = 1.0f;
|
||||||
|
@ -892,7 +892,7 @@ bool CCombatPhrase::evaluate()
|
||||||
_NotEnoughStaminaMsg = false;
|
_NotEnoughStaminaMsg = false;
|
||||||
_NotEnoughHpMsg = false;
|
_NotEnoughHpMsg = false;
|
||||||
_DisengageOnEnd = false;
|
_DisengageOnEnd = false;
|
||||||
_LatencyEndDate = 0.0f;
|
_LatencyEndDate = 0.0;
|
||||||
_ExecutionEndDate = 0;
|
_ExecutionEndDate = 0;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1702,7 +1702,7 @@ bool CCombatPhrase::launch()
|
||||||
{
|
{
|
||||||
H_AUTO(CCombatPhrase_launch);
|
H_AUTO(CCombatPhrase_launch);
|
||||||
|
|
||||||
_LatencyEndDate = 0.0f;
|
_LatencyEndDate = 0.0;
|
||||||
_ApplyDate = 0;
|
_ApplyDate = 0;
|
||||||
|
|
||||||
if ( !_Attacker )
|
if ( !_Attacker )
|
||||||
|
|
|
@ -1568,7 +1568,7 @@ bool CMagicPhrase::launch()
|
||||||
if (_DivineInterventionOccured||_ShootAgainOccured?_BaseCastingTime:_CastingTime)
|
if (_DivineInterventionOccured||_ShootAgainOccured?_BaseCastingTime:_CastingTime)
|
||||||
_LatencyEndDate = (double)time + PostCastLatency + _PostCastTime;
|
_LatencyEndDate = (double)time + PostCastLatency + _PostCastTime;
|
||||||
else
|
else
|
||||||
_LatencyEndDate = 0.0f + _PostCastTime;
|
_LatencyEndDate = 0.0 + _PostCastTime;
|
||||||
|
|
||||||
// compute the apply date
|
// compute the apply date
|
||||||
if ( !_Targets.empty() && _ActorRowId != _Targets[0].getId())
|
if ( !_Targets.empty() && _ActorRowId != _Targets[0].getId())
|
||||||
|
@ -1898,7 +1898,7 @@ void CMagicPhrase::enchantPhrase(CCharacter * user,float successFactor)
|
||||||
|
|
||||||
_Targets.resize(1);
|
_Targets.resize(1);
|
||||||
// user->setActionFlag( RYZOMACTIONFLAGS::Attacks, true );
|
// user->setActionFlag( RYZOMACTIONFLAGS::Attacks, true );
|
||||||
_LatencyEndDate = 0.0f;//time + _HitRateModifier + weapon.LatencyInTicks + ammo.SpeedInTicks ;
|
_LatencyEndDate = 0.0;//time + _HitRateModifier + weapon.LatencyInTicks + ammo.SpeedInTicks ;
|
||||||
// _BeingProcessed = false;
|
// _BeingProcessed = false;
|
||||||
|
|
||||||
} // enchantPhrase //
|
} // enchantPhrase //
|
||||||
|
|
|
@ -463,7 +463,8 @@ void CPhraseManager::updatePhrases()
|
||||||
updateEntityCurrentAction( (*it).first, entityPhrases);
|
updateEntityCurrentAction( (*it).first, entityPhrases);
|
||||||
phrase = entityPhrases.getCurrentAction();
|
phrase = entityPhrases.getCurrentAction();
|
||||||
//Every time we get the next action, th phrase might be deleted (if the action is invalid or finished for non-cyclic actions like digging / crafting), always check !
|
//Every time we get the next action, th phrase might be deleted (if the action is invalid or finished for non-cyclic actions like digging / crafting), always check !
|
||||||
} while(phrase != NULL && old_state != phrase->state());
|
}
|
||||||
|
while(phrase != NULL && old_state != phrase->state());
|
||||||
|
|
||||||
// get next entity sentences
|
// get next entity sentences
|
||||||
++it;
|
++it;
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
_Idle = false;
|
_Idle = false;
|
||||||
_ExecutionEndDate = 0;
|
_ExecutionEndDate = 0;
|
||||||
_ApplyDate = ~0; // ensure apply() never called before launch()
|
_ApplyDate = ~0; // ensure apply() never called before launch()
|
||||||
_LatencyEndDate = 0.0f; // by default, time between apply() and end() is immediate
|
_LatencyEndDate = 0.0; // by default, time between apply() and end() is immediate
|
||||||
_PhraseBookIndex = 0;
|
_PhraseBookIndex = 0;
|
||||||
_NextCounter = 0;
|
_NextCounter = 0;
|
||||||
_IsStatic = false;
|
_IsStatic = false;
|
||||||
|
|
|
@ -758,7 +758,7 @@ bool CSpecialPowerPhrase::launch()
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
void CSpecialPowerPhrase::apply()
|
void CSpecialPowerPhrase::apply()
|
||||||
{
|
{
|
||||||
_LatencyEndDate = 0.0f;
|
_LatencyEndDate = 0.0;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// apply effect
|
// apply effect
|
||||||
|
|
Loading…
Reference in a new issue