[Sync] Minor project sync

This commit is contained in:
Antz 2015-04-10 23:09:09 +01:00 committed by Antz
parent c2f1403c6a
commit 51affc470c
3 changed files with 6 additions and 5 deletions

View File

@ -882,7 +882,7 @@ void AuctionBotBuyer::PlaceBidToEntry(AuctionEntry* auction, uint32 bidPrice)
void AuctionBotBuyer::BuyEntry(AuctionEntry* auction)
{
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: Entry %u buyed at %.2fg", auction->Id, float(auction->buyout) / 10000.0f);
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: Entry %u bought at %.2fg", auction->Id, float(auction->buyout) / 10000.0f);
auction->UpdateBid(auction->buyout);
}

View File

@ -2103,7 +2103,7 @@ bool ChatHandler::HandleNpcNameCommand(char* /*args*/)
}
pCreature->SetName(args);
uint32 idname = objmgr.AddCreatureTemplate(pCreature->GetName());
uint32 idname = sObjectMgr.AddCreatureTemplate(pCreature->GetName());
pCreature->SetUInt32Value(OBJECT_FIELD_ENTRY, idname);
pCreature->SaveToDB();
@ -2149,7 +2149,7 @@ bool ChatHandler::HandleNpcSubNameCommand(char* /*args*/)
return true;
}
uint32 idname = objmgr.AddCreatureSubName(pCreature->GetName(),args,pCreature->GetUInt32Value(UNIT_FIELD_DISPLAYID));
uint32 idname = sObjectMgr.AddCreatureSubName(pCreature->GetName(),args,pCreature->GetUInt32Value(UNIT_FIELD_DISPLAYID));
pCreature->SetUInt32Value(OBJECT_FIELD_ENTRY, idname);
pCreature->SaveToDB();

View File

@ -102,7 +102,8 @@ uint32 GetItemEnchantMod(uint32 entry)
double dRoll = rand_chance();
float fCount = 0;
for (EnchStoreList::const_iterator ench_iter = tab->second.begin(); ench_iter != tab->second.end(); ++ench_iter)
const EnchStoreList &enchantList = tab->second;
for (EnchStoreList::const_iterator ench_iter = enchantList.begin(); ench_iter != enchantList.end(); ++ench_iter)
{
fCount += ench_iter->chance;
@ -113,7 +114,7 @@ uint32 GetItemEnchantMod(uint32 entry)
dRoll = (irand(0, (int)floor(fCount * 100) + 1)) / 100;
fCount = 0;
for (EnchStoreList::const_iterator ench_iter = tab->second.begin(); ench_iter != tab->second.end(); ++ench_iter)
for (EnchStoreList::const_iterator ench_iter = enchantList.begin(); ench_iter != enchantList.end(); ++ench_iter)
{
fCount += ench_iter->chance;