Continuation of commit 1f1735ad0c81a6740a6345c0b7ae1c5d195628c6

Just some minor cleanup stuff. This commit should finally be complete.
This commit is contained in:
Wolverine 2017-08-30 13:39:16 -06:00 committed by MadMax
parent 021aa8cfac
commit cf262563c0
3 changed files with 6 additions and 12 deletions

View File

@ -841,7 +841,6 @@ bool AuctionBotBuyer::IsBuyableEntry(uint32 buyoutPrice, double InGame_BuyPrice,
bool AuctionBotBuyer::IsBidableEntry(uint32 bidPrice, double InGame_BuyPrice, double MaxBidablePrice, uint32 MinBidPrice, uint32 MaxChance, uint32 ChanceRatio)
{
double ratio = 0;
uint32 Chance = 0;
if (bidPrice <= MinBidPrice)
@ -852,7 +851,7 @@ bool AuctionBotBuyer::IsBidableEntry(uint32 bidPrice, double InGame_BuyPrice, do
{
if (bidPrice < MaxBidablePrice)
{
ratio = MaxBidablePrice / bidPrice;
double ratio = MaxBidablePrice / bidPrice;
if (ratio < 3)
{ Chance = ((MaxChance / 500) * ratio); }
else
@ -866,7 +865,7 @@ bool AuctionBotBuyer::IsBidableEntry(uint32 bidPrice, double InGame_BuyPrice, do
{
if (bidPrice < MaxBidablePrice)
{
ratio = MaxBidablePrice / bidPrice;
double ratio = MaxBidablePrice / bidPrice;
if (ratio < 4)
{ Chance = ((MaxChance / 1000) * ratio); }
else

View File

@ -2336,14 +2336,11 @@ bool Map::GetReachableRandomPointOnGround(float& x, float& y, float& z, float ra
// Get random point by handling different situation depending of if the unit is flying/swimming/walking
bool Map::GetReachableRandomPosition(Unit* unit, float& x, float& y, float& z, float radius)
{
float i_x = x;
float i_y = y;
float i_z = z;
bool newDestAssigned = false; // used to check if new random destination is found
bool isFlying = false;
bool isFlying;
bool isSwimming = true;
switch (unit->GetTypeId())
{
@ -2365,7 +2362,8 @@ bool Map::GetReachableRandomPosition(Unit* unit, float& x, float& y, float& z, f
return false;
}
if (isFlying)
bool newDestAssigned;
if (isFlying)
{
newDestAssigned = GetRandomPointInTheAir(i_x, i_y, i_z, radius);
}

View File

@ -300,7 +300,6 @@ namespace VMAP
//=================================================================
bool TileAssembler::convertRawFile(const std::string& pModelFilename, const char *RAW_VMAP_MAGIC)
{
bool success = true;
std::string filename = iSrcDir;
if (filename.length() > 0)
{ filename.append("/"); }
@ -329,9 +328,7 @@ namespace VMAP
model.SetGroupModels(groupsArray);
}
success = model.WriteFile(iDestDir + "/" + pModelFilename + ".vmo");
return success;
return model.WriteFile(iDestDir + "/" + pModelFilename + ".vmo");
}
void TileAssembler::exportGameobjectModels(const char *RAW_VMAP_MAGIC)