static int GetInfoByName(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); XMLLoader <XMLDataGenerals> obj = LuaScriptMgr.GetNetObject <XMLLoader <XMLDataGenerals> >(L, 1); string arg0 = LuaScriptMgr.GetLuaString(L, 2); XMLDataGenerals o = obj.GetInfoByName(arg0); LuaScriptMgr.PushObject(L, o); return(1); }
static int GetInfoById(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); XMLLoader <XMLDataGenerals> obj = LuaScriptMgr.GetNetObject <XMLLoader <XMLDataGenerals> >(L, 1); int arg0 = (int)LuaScriptMgr.GetNumber(L, 2); XMLDataGenerals o = obj.GetInfoById(arg0); LuaScriptMgr.PushObject(L, o); return(1); }
static int get_Face(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); if (o == null) { LuaDLL.luaL_error(L, "unknown member name Face"); } XMLDataGenerals obj = (XMLDataGenerals)o; LuaScriptMgr.Push(L, obj.Face); return(1); }
static int set_Flags(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); if (o == null) { LuaDLL.luaL_error(L, "unknown member name Flags"); } XMLDataGenerals obj = (XMLDataGenerals)o; obj.Flags = (int)LuaScriptMgr.GetNumber(L, 3); return(0); }
static int set_Blood(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); if (o == null) { LuaDLL.luaL_error(L, "unknown member name Blood"); } XMLDataGenerals obj = (XMLDataGenerals)o; obj.Blood = LuaScriptMgr.GetString(L, 3); return(0); }
static int set_UseBattleArray(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); if (o == null) { LuaDLL.luaL_error(L, "unknown member name UseBattleArray"); } XMLDataGenerals obj = (XMLDataGenerals)o; obj.UseBattleArray = LuaScriptMgr.GetString(L, 3); return(0); }
static int set_TimesState(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); if (o == null) { LuaDLL.luaL_error(L, "unknown member name TimesState"); } XMLDataGenerals obj = (XMLDataGenerals)o; obj.TimesState = LuaScriptMgr.GetNetObject <String[]>(L, 3); return(0); }
static int set_WiseSkillLevel(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); if (o == null) { LuaDLL.luaL_error(L, "unknown member name WiseSkillLevel"); } XMLDataGenerals obj = (XMLDataGenerals)o; obj.WiseSkillLevel = LuaScriptMgr.GetNetObject <Int32[]>(L, 3); return(0); }
static int get_Times(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); if (o == null) { LuaDLL.luaL_error(L, "unknown member name Times"); } XMLDataGenerals obj = (XMLDataGenerals)o; LuaScriptMgr.PushArray(L, obj.Times); return(1); }
static int get_WiseSkillLevel(IntPtr L) { object o = LuaScriptMgr.GetLuaObject(L, 1); if (o == null) { LuaDLL.luaL_error(L, "unknown member name WiseSkillLevel"); } XMLDataGenerals obj = (XMLDataGenerals)o; LuaScriptMgr.PushArray(L, obj.WiseSkillLevel); return(1); }
public static int FindGeneralID(string name) { if (string.IsNullOrEmpty(name)) { return(0); } string generalName = Utility.GeneralName(name); IEnumerator enumerator = XMLManager.Generals.Data.Values.GetEnumerator(); while (enumerator.MoveNext()) { XMLDataGenerals data = (XMLDataGenerals)enumerator.Current; if (Utility.GeneralName(data.Name) == generalName) { return(data.ID); } } Debugging.LogError("Function:FindGeneralID; name = " + name); return(-1); }
public GeneralInfo(int id) { ID = id; XMLDataGenerals data = XMLManager.Generals.GetInfoById(ID); string stateValue = data.TimesState[GamePublic.Instance.CurrentTimes]; switch (stateValue) { case "": State = -1; break; case "野": State = 0; break; case "登": State = 1; break; default: Debugging.LogError("Function:GeneralInfo; stateValue = " + stateValue); break; } Name = data.Name; Face = data.Face; CityID = DataManager.FindCityID(data.Times[GamePublic.Instance.CurrentTimes]); if (CityID > 0 && State == 1) { KingID = GamePublic.Instance.DataManager.GetCityInfo(CityID).KingID; } else { KingID = 0; } PrisonerID = 0; Loyalty = data.Loyalty; GetSkills(data.Skill, data.SkillLevel); GetWiseSkills(data.WiseSkill, data.WiseSkillLevel); Title = 0; Strength = data.Strength; Intellect = data.Intellect; Experience = 200; Level = 1; BaseHP = data.BaseHP; CurHP = BaseHP; BaseMP = data.BaseMP; CurMP = BaseMP; SoldierMax = 10; SoldierCur = 10; KnightMax = 0; KnightCur = 0; ForceArray = DataManager.FindForceID(data.Force); UseForce = DataManager.FindForceID(data.UseForce); BattleArray = DataManager.FindBattleID(data.BattleArray); Weapon = DataManager.FindThingsID(data.Weapon); Horse = DataManager.FindThingsID(data.Horse); Thing = DataManager.FindThingsID(data.Thing); Escape = 0; }