All pastes #715230 Raw Edit

Untitled

public text v1 · immutable
#715230 ·published 2007-09-26 03:38 UTC
rendered paste body
    case 2:     // 黎明森林 统一格式说明:(info->mapId, 0, LocationVector(info->positionX, info->positionY, info->positionZ));
        {
		uint32 price=100000;// 价格10G
		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); // Thunderfury
		Plr->SafeTeleport(0,0,-10593.854492,-435.772003,84.210320,6.273752);
        }else{
			Plr->GetSession()->SendNotification("You don't have enough money. Need %u Gold",price/30,000);
		}
		}
        break;