Initialize local project and fix ranch growth synchronization
This commit is contained in:
@@ -0,0 +1,186 @@
|
||||
package net.pixvi.myr.element.city
|
||||
{
|
||||
import net.pixvi.myr.center.Master;
|
||||
import net.pixvi.myr.center.Table;
|
||||
import net.pixvi.pfw.utils.Random;
|
||||
|
||||
public class CityVo
|
||||
{
|
||||
|
||||
public var cid:int;
|
||||
|
||||
public function CityVo(id:int)
|
||||
{
|
||||
super();
|
||||
cid = id;
|
||||
}
|
||||
|
||||
public static function checkUnlock(city:int) : Boolean
|
||||
{
|
||||
if(Table.city_info[city].hide == true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return Master.history.unlockCity[city];
|
||||
}
|
||||
|
||||
public function get name() : String
|
||||
{
|
||||
return table().name;
|
||||
}
|
||||
|
||||
public function get hasMine() : Boolean
|
||||
{
|
||||
return Table.mine_info.cityMine[cid.toString()] != null;
|
||||
}
|
||||
|
||||
public function wildArea() : String
|
||||
{
|
||||
if(table().wildArea != null && table().wildArea != "")
|
||||
{
|
||||
return table().wildArea;
|
||||
}
|
||||
return table().cid;
|
||||
}
|
||||
|
||||
public function get openExtraModeOpen() : Boolean
|
||||
{
|
||||
if(table().openExtraModeStage == null || table().openExtraModeStage == "" || Master.history.passStage[table().openExtraModeStage] != null && Master.history.passStage[table().openExtraModeStage]["1"] == true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function get openHardModeOpen() : Boolean
|
||||
{
|
||||
if(table().openHardModeStage == null || table().openHardModeStage == "" || Master.history.passStage[table().openHardModeStage] != null && Master.history.passStage[table().openHardModeStage]["1"] == true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function get wildDes() : String
|
||||
{
|
||||
return table().wild;
|
||||
}
|
||||
|
||||
public function get des() : String
|
||||
{
|
||||
return table().des;
|
||||
}
|
||||
|
||||
public function get barDes() : String
|
||||
{
|
||||
return table().bar;
|
||||
}
|
||||
|
||||
public function get marketDes() : String
|
||||
{
|
||||
return table().market;
|
||||
}
|
||||
|
||||
public function get alchemyDes() : String
|
||||
{
|
||||
return table().alchemy;
|
||||
}
|
||||
|
||||
public function get xiehuiDes() : String
|
||||
{
|
||||
return table().xiehui;
|
||||
}
|
||||
|
||||
public function get country() : int
|
||||
{
|
||||
return table().country;
|
||||
}
|
||||
|
||||
public function get imgSrc() : String
|
||||
{
|
||||
return "data/img/bg/bg_city_" + cid + ".jpg";
|
||||
}
|
||||
|
||||
public function get imgTitle() : String
|
||||
{
|
||||
return "data/img/city/title_city" + cid + ".png";
|
||||
}
|
||||
|
||||
public function get marketOpenSnd() : String
|
||||
{
|
||||
if(table().marketOpenSnd == null)
|
||||
{
|
||||
return "marketOpen";
|
||||
}
|
||||
return table().marketOpenSnd;
|
||||
}
|
||||
|
||||
public function get cityShadowImg() : String
|
||||
{
|
||||
return table().cityShadowImg;
|
||||
}
|
||||
|
||||
public function get cityShadowImgFloatX() : int
|
||||
{
|
||||
return table().cityShadowImgFloatX;
|
||||
}
|
||||
|
||||
public function get cityShadowImgFloatY() : int
|
||||
{
|
||||
return table().cityShadowImgFloatY;
|
||||
}
|
||||
|
||||
public function get xiehuiImg() : String
|
||||
{
|
||||
return table().xiehuiImg;
|
||||
}
|
||||
|
||||
public function get xiehuiImgFloatX() : int
|
||||
{
|
||||
return table().xiehuiImgFloatX;
|
||||
}
|
||||
|
||||
public function get xiehuiImgFloatY() : int
|
||||
{
|
||||
return table().xiehuiImgFloatY;
|
||||
}
|
||||
|
||||
public function get marketBuyStory() : String
|
||||
{
|
||||
if(table().marketBuyStory == null)
|
||||
{
|
||||
return "sys_market_" + Random.integer(1,2);
|
||||
}
|
||||
return table().marketBuyStory;
|
||||
}
|
||||
|
||||
public function get xiehuiBgImg() : String
|
||||
{
|
||||
if(table().xiehuiBgImg == null)
|
||||
{
|
||||
return "/data/img/bg/bg_3.jpg";
|
||||
}
|
||||
return table().xiehuiBgImg;
|
||||
}
|
||||
|
||||
public function get shichangBgImg() : String
|
||||
{
|
||||
if(table().shichangBgImg == null)
|
||||
{
|
||||
return "/data/img/bg/bg_2.jpg";
|
||||
}
|
||||
return table().shichangBgImg;
|
||||
}
|
||||
|
||||
public function table() : Object
|
||||
{
|
||||
return Table.city_info[cid];
|
||||
}
|
||||
|
||||
public function unlock() : Boolean
|
||||
{
|
||||
return checkUnlock(cid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user