// Ryzom - MMORPG Framework
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
#include "stdpch.h"
#include "village.h"
#include "nel/georges/u_form.h"
#include "nel/georges/u_form_elm.h"
#include "nel/misc/vector.h"
#include "nel/misc/vector_2f.h"
#include "client_sheets/village_sheet.h"
#include "client_sheets/entity_sheet.h"
#include "zone_util.h"
#include "ig_enum.h"
#include "ingame_database_manager.h"
#include "sheet_manager.h"
#include "pacs_client.h"
#include "client_cfg.h"
using namespace NLMISC;
using namespace std;
//===================================================================================
CVillage::CVillage() : _Scene(NULL)
{
// Not an output
_IsOutpost = false;
// Init buildings
for (uint i=0; i=RZ_MAX_BUILDING_PER_OUTPOST)
return;
CBuilding &building= _Buildings[buildingId];
// Form has changed ?
if (building.CurrentSheetId != newForm)
{
// Resize the streamable ig, if needed
for (uint i=_IG.getIGNum(); i(entitySheet);
if (bldSh)
{
// todo hulud here, manage multi igs for multi building state
igName = bldSh->BuildedIg;
}
}
// Set the building IG
_IG.setIG(building.Id, igName, "");
building.CurrentSheetId = newForm;
}
}