mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +00:00
[11490] Alow implicit cast ObjectGuid->uint64 and only explicit uint64->ObjectGuid
Now safe allow this casts in like way after completed convertion to ObjectGuid use. Also simplify code in result allowed auto cast to uint64. Please _not_ add new uint64 storages (local and in structures) for guid values.
This commit is contained in:
parent
ecdb435b1e
commit
249fb836ca
47 changed files with 194 additions and 210 deletions
|
|
@ -655,7 +655,7 @@ void Creature::RegenerateMana()
|
|||
uint32 addvalue = 0;
|
||||
|
||||
// Combat and any controlled creature
|
||||
if (isInCombat() || !GetCharmerOrOwnerGuid().IsEmpty())
|
||||
if (isInCombat() || GetCharmerOrOwnerGuid())
|
||||
{
|
||||
if(!IsUnderLastManaUseEffect())
|
||||
{
|
||||
|
|
@ -685,7 +685,7 @@ void Creature::RegenerateHealth()
|
|||
uint32 addvalue = 0;
|
||||
|
||||
// Not only pet, but any controlled creature
|
||||
if (!GetCharmerOrOwnerGuid().IsEmpty())
|
||||
if (GetCharmerOrOwnerGuid())
|
||||
{
|
||||
float HealthIncreaseRate = sWorld.getConfig(CONFIG_FLOAT_RATE_HEALTH);
|
||||
float Spirit = GetStat(STAT_SPIRIT);
|
||||
|
|
@ -969,7 +969,7 @@ void Creature::PrepareBodyLootState()
|
|||
*/
|
||||
Player* Creature::GetOriginalLootRecipient() const
|
||||
{
|
||||
return !m_lootRecipientGuid.IsEmpty() ? ObjectAccessor::FindPlayer(m_lootRecipientGuid) : NULL;
|
||||
return m_lootRecipientGuid ? ObjectAccessor::FindPlayer(m_lootRecipientGuid) : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1835,7 +1835,7 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /
|
|||
return false;
|
||||
|
||||
// only free creature
|
||||
if (!GetCharmerOrOwnerGuid().IsEmpty())
|
||||
if (GetCharmerOrOwnerGuid())
|
||||
return false;
|
||||
|
||||
// only from same creature faction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue