[Server] Use consistent code style and make all files end in newlines

pull/454/head
David Cernat 7 years ago
parent 49bf605e8e
commit 058d67dbd0

@ -46,7 +46,7 @@ Inventory::~Inventory()
void Inventory::update()
{
printf("Inventory::update()");
/*if(isEquipmentChanged())
/*if (isEquipmentChanged())
{
if (netActor->isPlayer())
{
@ -100,7 +100,7 @@ void Inventory::equipItem(unsigned short slot, const std::string& refId, unsigne
if (!Utils::vectorContains(&netActor->getNetCreature()->equipmentIndexChanges, slot))
netActor->getNetCreature()->equipmentIndexChanges.push_back(slot);
if(!equipmentChanged && netActor->isPlayer())
if (!equipmentChanged && netActor->isPlayer())
netActor->toPlayer()->addToUpdateQueue();
equipmentChanged = true;
@ -114,7 +114,7 @@ void Inventory::unequipItem( unsigned short slot)
void Inventory::addItem(const std::string &refId, unsigned int count, int charge, float enchantmentCharge)
{
if(!inventoryChanged)
if (!inventoryChanged)
resetInventoryFlag();
mwmp::Item item;
@ -131,7 +131,7 @@ void Inventory::addItem(const std::string &refId, unsigned int count, int charge
void Inventory::removeItem(const std::string &refId, unsigned short count)
{
if(!inventoryChanged)
if (!inventoryChanged)
resetInventoryFlag();
mwmp::Item item;
item.refId = refId;

@ -40,7 +40,7 @@ void NetActor::setPosition(float x, float y, float z)
netCreature->position.pos[1] = y;
netCreature->position.pos[2] = z;
if(!positionChanged && isPlayer())
if (!positionChanged && isPlayer())
toPlayer()->addToUpdateQueue();
positionChanged = true;
}

@ -185,7 +185,7 @@ public:
template<Event event, bool canProvideOldState = false, typename R = void, typename... Args>
R Call(Args&&... args)
{
if(canProvideOldState)
if (canProvideOldState)
events.at(event).callWOld(std::forward<Args>(args)...);
else
return events.at(event).call(CallbackCollection::type_tag<R>{}, std::forward<Args>(args)...);

@ -72,7 +72,7 @@ void Timer::tick()
if (time - startTime >= targetMsec)
{
end = true;
if(callback.valid())
if (callback.valid())
{
LOG_MESSAGE_SIMPLE(Log::LOG_TRACE, "Timer::tick time expired, callback %p valid", callback.registry_index());
callback.call(data);
@ -126,7 +126,7 @@ void TimerController::tick()
LOG_MESSAGE_SIMPLE(Log::LOG_TRACE, "Deleted %d timers\n", deleted);
}
if(!newTimersQueue.empty())
if (!newTimersQueue.empty())
{
timers.insert(timers.begin(), make_move_iterator(newTimersQueue.begin()), make_move_iterator(newTimersQueue.end()));
LOG_MESSAGE_SIMPLE(Log::LOG_TRACE, "Created %d timers\n", newTimersQueue.size());

Loading…
Cancel
Save