Sourcefile sleanups -> tabs to spaces, remove whitespace - also update the cleanupscripts very slightly
--HG-- branch : trunk
This commit is contained in:
@@ -1265,7 +1265,7 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
|
||||
}
|
||||
|
||||
uint32 curhealth;
|
||||
|
||||
|
||||
if (!m_regenHealth)
|
||||
{
|
||||
curhealth = data->curhealth;
|
||||
@@ -1609,7 +1609,7 @@ void Creature::Respawn(bool force)
|
||||
uint16 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<Creature>(GetDBTableGUIDLow()) : 0;
|
||||
if (poolid)
|
||||
sPoolMgr.UpdatePool<Creature>(poolid, GetDBTableGUIDLow());
|
||||
|
||||
|
||||
//Re-initialize reactstate that could be altered by movementgenerators
|
||||
InitializeReactState();
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ class Creature : public Unit, public GridObject<Creature>
|
||||
bool canWalk() const { return GetCreatureInfo()->InhabitType & INHABIT_GROUND; }
|
||||
bool canSwim() const { return GetCreatureInfo()->InhabitType & INHABIT_WATER; }
|
||||
//bool canFly() const { return GetCreatureInfo()->InhabitType & INHABIT_AIR; }
|
||||
|
||||
|
||||
void SetReactState(ReactStates st) { m_reactState = st; }
|
||||
ReactStates GetReactState() { return m_reactState; }
|
||||
bool HasReactState(ReactStates state) const { return (m_reactState == state); }
|
||||
|
||||
@@ -1071,7 +1071,7 @@ bool Item::IsBindedNotWith(Player const* player) const
|
||||
// BOA item case
|
||||
if (IsBoundAccountWide())
|
||||
return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ uint32 GetItemEnchantMod(int32 entry)
|
||||
|
||||
if (entry == -1)
|
||||
return 0;
|
||||
|
||||
EnchantmentStore::const_iterator tab = RandomItemEnch.find(entry);
|
||||
|
||||
EnchantmentStore::const_iterator tab = RandomItemEnch.find(entry);
|
||||
if (tab == RandomItemEnch.end())
|
||||
{
|
||||
sLog.outErrorDb("Item RandomProperty / RandomSuffix id #%u used in `item_template` but it does not have records in `item_enchantment_template` table.",entry);
|
||||
|
||||
@@ -418,11 +418,11 @@ struct Position
|
||||
|
||||
Position::PositionXYZStreamer PositionXYZStream()
|
||||
{
|
||||
return Position::PositionXYZStreamer(*this);
|
||||
return Position::PositionXYZStreamer(*this);
|
||||
}
|
||||
Position::PositionXYZOStreamer PositionXYZOStream()
|
||||
{
|
||||
return Position::PositionXYZOStreamer(*this);
|
||||
return Position::PositionXYZOStreamer(*this);
|
||||
}
|
||||
|
||||
bool IsPositionValid() const;
|
||||
@@ -808,7 +808,7 @@ namespace Trinity
|
||||
_list.erase(itr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Binary predicate to sort WorldObjects based on the distance to a reference WorldObject
|
||||
class ObjectDistanceOrderPred
|
||||
{
|
||||
|
||||
@@ -4361,7 +4361,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
||||
uint32 charDelete_method = sWorld.getConfig(CONFIG_CHARDELETE_METHOD);
|
||||
uint32 charDelete_minLvl = sWorld.getConfig(CONFIG_CHARDELETE_MIN_LEVEL);
|
||||
|
||||
// if we want to finally delete the character or the character does not meet the level requirement,
|
||||
// if we want to finally delete the character or the character does not meet the level requirement,
|
||||
// we set it to mode CHAR_DELETE_REMOVE
|
||||
if (deleteFinally || Player::GetLevelFromDB(playerguid) < charDelete_minLvl)
|
||||
charDelete_method = CHAR_DELETE_REMOVE;
|
||||
@@ -4530,7 +4530,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
||||
sLog.outError("Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method);
|
||||
}
|
||||
|
||||
if (updateRealmChars)
|
||||
if (updateRealmChars)
|
||||
sWorld.UpdateRealmCharCount(accountId);
|
||||
}
|
||||
|
||||
@@ -7877,7 +7877,7 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
|
||||
|
||||
// Apply spell mods
|
||||
ApplySpellMod(pEnchant->spellid[s],SPELLMOD_CHANCE_OF_SUCCESS,chance);
|
||||
|
||||
|
||||
// Shiv has 100% chance to apply the poison
|
||||
if (FindCurrentSpellBySpellId(5938) && e_slot == TEMP_ENCHANTMENT_SLOT)
|
||||
chance = 100.0f;
|
||||
@@ -12207,7 +12207,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count)
|
||||
{
|
||||
// change item amount before check (for unique max count check)
|
||||
pSrcItem->SetCount(pSrcItem->GetCount() - count);
|
||||
|
||||
|
||||
ItemPosCountVec dest;
|
||||
uint8 msg = CanStoreItem(dstbag, dstslot, dest, pNewItem, false);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
|
||||
@@ -840,7 +840,7 @@ struct AccessRequirement
|
||||
enum CharDeleteMethod
|
||||
{
|
||||
CHAR_DELETE_REMOVE = 0, // Completely remove from the database
|
||||
CHAR_DELETE_UNLINK = 1 // The character gets unlinked from the account,
|
||||
CHAR_DELETE_UNLINK = 1 // The character gets unlinked from the account,
|
||||
// the name gets freed up and appears as deleted ingame
|
||||
};
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids)
|
||||
return false;
|
||||
|
||||
TaxiPathNodeList const& path = sTaxiPathNodesByPath[pathid];
|
||||
|
||||
|
||||
std::vector<keyFrame> keyFrames;
|
||||
int mapChange = 0;
|
||||
mapids.clear();
|
||||
@@ -516,7 +516,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z)
|
||||
UpdateForMap(oldMap);
|
||||
UpdateForMap(newMap);
|
||||
}
|
||||
|
||||
|
||||
for (std::set<TransportCreatureProto *>::const_iterator i = sMapMgr.m_TransportNPCMap[GetEntry()].begin(); i != sMapMgr.m_TransportNPCMap[GetEntry()].end(); ++i)
|
||||
{
|
||||
TransportCreatureProto *proto = (*i);
|
||||
@@ -660,7 +660,7 @@ uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y,
|
||||
pCreature->Relocate(
|
||||
GetPositionX() + (x * cos(GetOrientation()) + y * sin(GetOrientation() + M_PI)),
|
||||
GetPositionY() + (y * cos(GetOrientation()) + x * sin(GetOrientation())),
|
||||
z + GetPositionZ() ,
|
||||
z + GetPositionZ() ,
|
||||
o + GetOrientation());
|
||||
|
||||
if(!pCreature->IsPositionValid())
|
||||
|
||||
@@ -64,7 +64,7 @@ class Transport : public GameObject
|
||||
struct WayPoint
|
||||
{
|
||||
WayPoint() : mapid(0), x(0), y(0), z(0), teleport(false), id(0) {}
|
||||
WayPoint(uint32 _mapid, float _x, float _y, float _z, bool _teleport, uint32 _id = 0,
|
||||
WayPoint(uint32 _mapid, float _x, float _y, float _z, bool _teleport, uint32 _id = 0,
|
||||
uint32 _arrivalEventID = 0, uint32 _departureEventID = 0)
|
||||
: mapid(_mapid), x(_x), y(_y), z(_z), teleport(_teleport), id(_id),
|
||||
arrivalEventID(_arrivalEventID), departureEventID(_departureEventID)
|
||||
|
||||
@@ -3617,7 +3617,7 @@ void Unit::_AddAura(UnitAura * aura, Unit * caster)
|
||||
{
|
||||
AuraEffect *existingEff = foundAura->GetEffect(i);
|
||||
AuraEffect *newEff = aura->GetEffect(i);
|
||||
if (!existingEff || !newEff)
|
||||
if (!existingEff || !newEff)
|
||||
continue;
|
||||
newEff->SetPeriodicTimer(existingEff->GetPeriodicTimer());
|
||||
}
|
||||
@@ -4427,7 +4427,7 @@ void Unit::RemoveAllAuras()
|
||||
AuraApplicationMap::iterator aurAppIter;
|
||||
for (aurAppIter = m_appliedAuras.begin(); aurAppIter != m_appliedAuras.end();)
|
||||
_UnapplyAura(aurAppIter, AURA_REMOVE_BY_DEFAULT);
|
||||
|
||||
|
||||
AuraMap::iterator aurIter;
|
||||
for (aurIter = m_ownedAuras.begin(); aurIter != m_ownedAuras.end();)
|
||||
RemoveOwnedAura(aurIter);
|
||||
@@ -7738,7 +7738,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if not handled by custom case, get triggered spell from dummySpell proto
|
||||
if (!triggered_spell_id)
|
||||
@@ -7914,7 +7914,7 @@ bool Unit::HandleAuraProc(Unit * pVictim, uint32 damage, Aura * triggeredByAura,
|
||||
int32 bp0 = (damage/12) * SpellMgr::CalculateSpellEffectAmount(dummySpell, 2)/100;
|
||||
CastCustomSpell(pVictim, 66922, &bp0, NULL, NULL, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// but should not proc on non-critical Holy Shocks
|
||||
else if ((procSpell->SpellFamilyFlags[0] & 0x200000 || procSpell->SpellFamilyFlags[1] & 0x10000) && !(procEx & PROC_EX_CRITICAL_HIT))
|
||||
@@ -9803,7 +9803,7 @@ int32 Unit::DealHeal(Unit *pVictim, uint32 addhealth, SpellEntry const *spellPro
|
||||
// calculate heal absorb and reduce healing
|
||||
CalcHealAbsorb(pVictim, spellProto, addhealth, absorb);
|
||||
int32 gain = 0;
|
||||
|
||||
|
||||
if (addhealth)
|
||||
gain = pVictim->ModifyHealth(int32(addhealth));
|
||||
|
||||
@@ -10572,7 +10572,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
|
||||
// Mobs can't crit with spells.
|
||||
if (IS_CREATURE_GUID(GetGUID()))
|
||||
return false;
|
||||
|
||||
|
||||
// not critting spell
|
||||
if ((spellProto->AttributesEx2 & SPELL_ATTR_EX2_CANT_CRIT))
|
||||
return false;
|
||||
|
||||
@@ -691,7 +691,7 @@ enum MovementFlags2
|
||||
MOVEMENTFLAG2_UNK8 = 0x00000080,
|
||||
MOVEMENTFLAG2_UNK9 = 0x00000100,
|
||||
MOVEMENTFLAG2_UNK10 = 0x00000200,
|
||||
MOVEMENTFLAG2_INTERPOLATED_MOVEMENT = 0x00000400,
|
||||
MOVEMENTFLAG2_INTERPOLATED_MOVEMENT = 0x00000400,
|
||||
MOVEMENTFLAG2_INTERPOLATED_TURNING = 0x00000800,
|
||||
MOVEMENTFLAG2_INTERPOLATED_PITCHING = 0x00001000,
|
||||
MOVEMENTFLAG2_UNK14 = 0x00002000,
|
||||
@@ -699,7 +699,7 @@ enum MovementFlags2
|
||||
MOVEMENTFLAG2_UNK16 = 0x00008000,
|
||||
|
||||
// player only?
|
||||
MOVEMENTFLAG2_INTERPOLATED =
|
||||
MOVEMENTFLAG2_INTERPOLATED =
|
||||
MOVEMENTFLAG2_INTERPOLATED_MOVEMENT |
|
||||
MOVEMENTFLAG2_INTERPOLATED_TURNING |
|
||||
MOVEMENTFLAG2_INTERPOLATED_PITCHING
|
||||
@@ -2108,7 +2108,7 @@ namespace Trinity
|
||||
public:
|
||||
PowerPctOrderPred(Powers power, bool ascending = true) : m_power(power), m_ascending(ascending) {}
|
||||
bool operator() (const Unit *a, const Unit *b) const
|
||||
{
|
||||
{
|
||||
float rA = a->GetMaxPower(m_power) ? float(a->GetPower(m_power)) / float(a->GetMaxPower(m_power)) : 0.0f;
|
||||
float rB = b->GetMaxPower(m_power) ? float(b->GetPower(m_power)) / float(b->GetMaxPower(m_power)) : 0.0f;
|
||||
return m_ascending ? rA < rB : rA > rB;
|
||||
@@ -2117,14 +2117,14 @@ namespace Trinity
|
||||
const Powers m_power;
|
||||
const bool m_ascending;
|
||||
};
|
||||
|
||||
|
||||
// Binary predicate for sorting Units based on percent value of health
|
||||
class HealthPctOrderPred
|
||||
{
|
||||
public:
|
||||
HealthPctOrderPred(bool ascending = true) : m_ascending(ascending) {}
|
||||
bool operator() (const Unit *a, const Unit *b) const
|
||||
{
|
||||
{
|
||||
float rA = a->GetMaxHealth() ? float(a->GetHealth()) / float(a->GetMaxHealth()) : 0.0f;
|
||||
float rB = b->GetMaxHealth() ? float(b->GetHealth()) / float(b->GetMaxHealth()) : 0.0f;
|
||||
return m_ascending ? rA < rB : rA > rB;
|
||||
@@ -2150,14 +2150,14 @@ inline void Unit::SendMonsterMoveByPath(Path<Elem,Node> const& path, uint32 star
|
||||
data << uint32(((GetUnitMovementFlags() & MOVEMENTFLAG_LEVITATING) || isInFlight()) ? (SPLINEFLAG_FLYING|SPLINEFLAG_WALKING) : SPLINEFLAG_WALKING);
|
||||
data << uint32(traveltime);
|
||||
data << uint32(pathSize);
|
||||
|
||||
|
||||
for (uint32 i = start; i < end; ++i)
|
||||
{
|
||||
data << float(path[i].x);
|
||||
data << float(path[i].y);
|
||||
data << float(path[i].z);
|
||||
}
|
||||
|
||||
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -39,7 +39,7 @@ Vehicle::Vehicle(Unit *unit, VehicleEntry const *vehInfo) : me(unit), m_vehicleI
|
||||
++m_usableSeatNum;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// HACKY WAY, We must found a more generic way to handle this
|
||||
// Set inmunities since db ones are rewritten with player's ones
|
||||
switch (GetVehicleInfo()->m_ID)
|
||||
|
||||
Reference in New Issue
Block a user