rendered paste body case 2: // (info->mapId, 0, LocationVector(info->positionX, info->positionY, info->positionZ));
{
uint32 price=10000000;//
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
Item *item = objmgr.CreateItem( 100601, Plr); // Guild Key 1
Plr->GetItemInterface()->AddItemToFreeSlot(item);
Plr->SafeTeleport(451,0,15637.739258,-16175.264648,44.936722,6.273752);
}else{
Plr->GetSession()->SendNotification("You don't have enough money. Need %u Gold",price/30,000);
}
}
QueryResult * result = NULL;
result = CharacterDatabase.Query("SELECT Taken FROM guildhouses WHERE Id='1'");
uint32 Taken = result->Fetch()->GetUInt32();
if(Taken == 1)
{
Plr->BroadcastMessage("This house has already been selected");
}
break;
}
}