/// <summary> /// ActionScriptObjectの直下にある指定のキー名のオブジェクトがあるかどうかを取得する /// </summary> /// <param name="asObject">対象先オブジェクト</param> /// <param name="keyName">キー名</param> /// <returns>オブジェクトがある場合はtrue、無い場合はfalseを返す</returns> public static bool IsExistObject(FluorineFx.ASObject asObject, String keyName) { Object obj = null; bool isExist = TryGetObject(asObject, keyName, out obj); return(isExist); }
private void ParseDeck(FluorineFx.ASObject asObject) { // 配列の時と、そうでない時がある。 // 前者はグループ編成画面を開いた時、後者は戦闘開始前やお使い終了時など。 Object deckObj = null; if (asObject.TryGetValue("deck", out deckObj) && deckObj != null) { Object[] deckObjs = null; // 単体の時 Type varType = deckObj.GetType(); if (varType == typeof(FluorineFx.ASObject)) { deckObjs = new FluorineFx.ASObject[1]; deckObjs[0] = (FluorineFx.ASObject)deckObj; } // 配列の時 else if (varType == typeof(Object[])) { deckObjs = (Object[])deckObj; } for (Int32 i = 0; i < deckObjs.Length; ++i) { FluorineFx.ASObject asObj = (FluorineFx.ASObject)deckObjs[i]; if (asObj != null) { DeckData parseData = new DeckData(); parseData.Parse(asObj); // 既出なら上書きする Int32 findDataIndex = mDeckDatas.FindIndex( delegate(DeckData a) { return(a.deckId == parseData.deckId); } ); if (0 <= findDataIndex) { mDeckDatas[findDataIndex] = parseData; } // 新出なら追加する else { mDeckDatas.Add(parseData); } } } // ID昇順でソートする mDeckDatas.Sort( delegate(DeckData a, DeckData b) { return(a.deckId - b.deckId); } ); } }
// Server system message public void msgFromSrvr(FluorineFx.ASObject msg) { //string ChatText = msg["text"].ToString(); //DateTime time = DateTime.Parse(msg["time"].ToString()); ////var Name = msg["sender"] as dotFlex.ASObject; //string Sender = "SYSTEM";// Name["name"].ToString(); //Console.WriteLine(Sender + " [" + time.ToString() + "] - " + ChatText); }
public void Parse(FluorineFx.ASObject asObject) { if (asObject != null) { AMFUtil.GetInt32Value(asObject, "itemMstId", out itemMstId); AMFUtil.GetInt32Value(asObject, "itemCount", out itemCount); } }
public static bool IsExistObject(FluorineFx.ASObject asObject, KeyNameType keyName) { String text = keyName.ToString(); text = text.ToLower(); return(IsExistObject(asObject, text)); }
public virtual FluorineFx.ASObject ToRequestObject() { FluorineFx.ASObject retVal = new FluorineFx.ASObject(); retVal.Add("params", GetParameterArray()); retVal.Add("sequence", _sequence); retVal.Add("functionName", _functionName); return retVal; }
/// <summary> /// AFMからパースする /// </summary> public void Parse(FluorineFx.ASObject bodyAsObject) { ParseItem(bodyAsObject); ParseDeck(bodyAsObject); ParseRefresh(bodyAsObject); ParseCard(bodyAsObject); ParsePlayer(bodyAsObject); // ADD: }
/// <summary> /// FluorineFx.ASObjectからパースを行う /// </summary> public void Parse(FluorineFx.ASObject asObject) { AMFUtil.GetInt32Value(asObject, "messageNo", out messageNo); AMFUtil.GetInt32Value(asObject, "messageType", out messageType); AMFUtil.GetStringValue(asObject, "startTime", out startTime); AMFUtil.GetStringValue(asObject, "endTime", out endTime); AMFUtil.GetStringValue(asObject, "text", out text); AMFUtil.GetInt32Value(asObject, "cardMstId", out cardMstId); }
public static void GetBooleanValue(FluorineFx.ASObject asObject, string key, out Boolean outValue) { outValue = false; object dataObj; if (asObject.TryGetValue(key, out dataObj) && dataObj != null) { outValue = (bool)dataObj; } }
public static void GetDoubleValue(FluorineFx.ASObject asObject, string key, out Double outValue) { outValue = 0.0f; object dataObj; if (asObject.TryGetValue(key, out dataObj) && dataObj != null) { outValue = (Double)dataObj; } }
public static void GetStringValue(FluorineFx.ASObject asObject, string key, out String outValue) { outValue = String.Empty; object dataObj; if (asObject.TryGetValue(key, out dataObj) && dataObj != null) { outValue = (String)dataObj; } }
public static void GetInt32Value(FluorineFx.ASObject asObject, string key, out Int32 outValue) { outValue = 0; object dataObj; if (asObject.TryGetValue(key, out dataObj) && dataObj != null) { outValue = (Int32)dataObj; } }
/// <summary> /// ActionScriptObjectの直下にある指定のキー名のオブジェクトを取得する /// 無い場合はnullが入る /// </summary> /// <param name="asObject">対象先オブジェクト</param> /// <param name="keyName">キー名</param> /// <param name="obj">取得先オブジェクト</param> /// <returns>オブジェクトがある場合はtrue、無い場合はfalseを返す</returns> public static bool TryGetObject(FluorineFx.ASObject asObject, String keyName, out Object obj) { obj = null; if (asObject.TryGetValue(keyName, out obj)) { return(true); } return(false); }
/// <summary> /// GirlLevelMst1つ分のパースを行う /// </summary> private static GirlLevelMstData SubParse(FluorineFx.ASObject asObject) { GirlLevelMstData data = new GirlLevelMstData(); AMFUtil.GetInt32Value(asObject, "diffExp", out data.diffExp); AMFUtil.GetInt32Value(asObject, "level", out data.level); AMFUtil.GetInt32Value(asObject, "maxDear", out data.maxDear); AMFUtil.GetInt32Value(asObject, "totalExp", out data.totalExp); return(data); }
public void Parse(FluorineFx.ASObject asObject) { AMFUtil.GetInt32Value(asObject, "productMstId", out productMstId); AMFUtil.GetInt32Value(asObject, "boradId", out boradId); AMFUtil.GetStringValue(asObject, "name", out name); AMFUtil.GetStringValue(asObject, "caption", out caption); AMFUtil.GetStringValue(asObject, "startTime", out startTime); AMFUtil.GetStringValue(asObject, "endTime", out endTime); AMFUtil.GetInt32Value(asObject, "spendType", out spendType); AMFUtil.GetInt32Value(asObject, "ruby", out ruby); }
/// <summary> /// ItemMst1つ分のパースを行う /// </summary> private static ItemMstData SubParse(FluorineFx.ASObject asObject) { ItemMstData data = new ItemMstData(); AMFUtil.GetDoubleValue(asObject, "effect1", out data.effect1); AMFUtil.GetDoubleValue(asObject, "effect2", out data.effect2); AMFUtil.GetInt32Value(asObject, "itemMstId", out data.itemMstId); AMFUtil.GetStringValue(asObject, "name", out data.name); AMFUtil.GetStringValue(asObject, "caption", out data.caption); AMFUtil.GetInt32Value(asObject, "type", out data.type); return(data); }
/// <summary> /// FluorineFx.ASObjectからパースを行う /// </summary> public void Parse(FluorineFx.ASObject asObject) { AMFUtil.GetInt32Value(asObject, "compositionSkillRawScore", out compositionSkillRawScore); AMFUtil.GetInt32Value(asObject, "baseLevelMax", out baseLevelMax); AMFUtil.GetInt32Value(asObject, "compositionCharacterRawScore", out compositionCharacterRawScore); AMFUtil.GetInt32Value(asObject, "conpositionCharacterAdditionalValue", out conpositionCharacterAdditionalValue); AMFUtil.GetStringValue(asObject, "name", out name); AMFUtil.GetInt32Value(asObject, "rebirthMax", out rebirthMax); AMFUtil.GetInt32Value(asObject, "compositionSkillAdditionalValue", out compositionSkillAdditionalValue); AMFUtil.GetInt32Value(asObject, "compositionPowerUpRawScore", out compositionPowerUpRawScore); AMFUtil.GetInt32Value(asObject, "rarityMstId", out rarityMstId); AMFUtil.GetInt32Value(asObject, "additionalLevelMaxByRebirth", out additionalLevelMaxByRebirth); }
private void ParseItem(FluorineFx.ASObject asObject) { Object itemObj = null; if (asObject.TryGetValue("item", out itemObj) && itemObj != null) { // 配列の時とそうでない時の両方に対応する Object[] itemObjs = null; Type varType = itemObj.GetType(); if (varType == typeof(FluorineFx.ASObject)) { itemObjs = new FluorineFx.ASObject[1]; itemObjs[0] = (FluorineFx.ASObject)itemObj; } else if (varType == typeof(Object[])) { itemObjs = (Object[])itemObj; } for (int i = 0; i < itemObjs.Length; ++i) { FluorineFx.ASObject asObj = itemObjs[i] as FluorineFx.ASObject; ItemData data = new ItemData(); data.Parse(asObj); // 既出なら上書きする Int32 findDataIndex = mItemDatas.FindIndex( delegate(ItemData inData) { return(inData.itemMstId == data.itemMstId); } ); if (0 <= findDataIndex) { // お使いから帰ってきた場合、増加値が返る。 // 結果の値はプレイヤー情報に入っているので、ここでは処理しない。 bool isOverride = !IsReturnHome(asObject); if (isOverride) { mItemDatas[findDataIndex] = data; } } // 新出なら追加する else { mItemDatas.Add(data); } } } }
public void Parse(FluorineFx.ASObject asObject) { if (asObject != null) { AMFUtil.GetInt32Value(asObject, "refreshId", out refreshId); AMFUtil.GetBooleanValue(asObject, "isOpen", out isOpen); AMFUtil.GetInt32Value(asObject, "cardId1", out cardId1); AMFUtil.GetInt32Value(asObject, "cardId2", out cardId2); AMFUtil.GetInt32Value(asObject, "cardId3", out cardId3); AMFUtil.GetInt32Value(asObject, "cardId4", out cardId4); AMFUtil.GetInt32Value(asObject, "cardId5", out cardId5); AMFUtil.GetStringValue(asObject, "endTime", out endTime); } }
public override object[] GetParameterArray() { FluorineFx.ASObject parameter1 = new FluorineFx.ASObject(); parameter1.Add("id",_id); parameter1.Add("tempId", float.NaN); parameter1.Add("state", "plowed"); parameter1.Add("itemName", ""); parameter1.Add("plantTime", float.NaN); parameter1.Add("direction", 0); parameter1.Add("position", new Game.Classes.ObjectPosition { X=0, Y=0,Z=0 }); parameter1.Add("className", "Plot"); return new object[] { "clear", parameter1, new object[] { } }; }
/* * $amf->_bodys[0]->_value[1][0]['params'][1]['id'] = $idu; $amf->_bodys[0]->_value[1][0]['params'][1]['className'] = 'Decoration'; $amf->_bodys[0]->_value[1][0]['params'][1]['position']['x'] = $x; $amf->_bodys[0]->_value[1][0]['params'][1]['position']['y'] = $y; $amf->_bodys[0]->_value[1][0]['params'][1]['position']['z'] = '0'; $amf->_bodys[0]->_value[1][0]['params'][1]['deleted'] = false; $amf->_bodys[0]->_value[1][0]['params'][1]['itemName'] = 'watermelonyellow'; $amf->_bodys[0]->_value[1][0]['params'][2][0]['isStorageWithdrawal'] = false; $amf->_bodys[0]->_value[1][0]['params'][2][0]['isGift'] = false; * */ public override object[] GetParameterArray() { FluorineFx.ASObject parameter1 = new FluorineFx.ASObject(); parameter1.Add("id", this._itemId); parameter1.Add("className","Decoration"); Classes.ObjectPosition pos = new Classes.ObjectPosition(){ X = _x, Y = _y, Z = 0 }; parameter1.Add("position", pos.ToObject()); parameter1.Add("deleted", false); parameter1.Add("itemName", _plantRequest); FluorineFx.ASObject parameter2 = new FluorineFx.ASObject(); parameter2.Add("isStorageWithdrawal", false); parameter2.Add("isGift", false); return new object[]{ "place", parameter1, new object[] { parameter2 } }; }
public void Parse(FluorineFx.ASObject asObject) { if (asObject != null) { AMFUtil.GetInt32Value(asObject, "deckId", out deckId); AMFUtil.GetStringValue(asObject, "deckName", out deckName); AMFUtil.GetBooleanValue(asObject, "isOpened", out isOpened); AMFUtil.GetInt32Value(asObject, "cardId1", out cardId1); AMFUtil.GetInt32Value(asObject, "cardId2", out cardId2); AMFUtil.GetInt32Value(asObject, "cardId3", out cardId3); AMFUtil.GetInt32Value(asObject, "cardId4", out cardId4); AMFUtil.GetInt32Value(asObject, "cardId5", out cardId5); AMFUtil.GetInt32Value(asObject, "status", out status); } }
public override object[] GetParameterArray() { FluorineFx.ASObject parameter1 = new FluorineFx.ASObject(); parameter1.Add("id", Animal.Id); parameter1.Add("deleted", false); parameter1.Add("state", "ripe"); parameter1.Add("tempId", float.NaN); parameter1.Add("direction", 0); parameter1.Add("position", Animal.Position.ToObject()); parameter1.Add("itemName", Animal.ItemName); parameter1.Add("plantTime", Animal.PlantTime); parameter1.Add("className", Animal.ClassName); FluorineFx.ASObject parameter2 = new FluorineFx.ASObject(); parameter2.Add("energyCost", 0); return new object[] { "harvest", parameter1, new object[] { parameter2 } }; }
public override object[] GetParameterArray() { FluorineFx.ASObject parameter1 = new FluorineFx.ASObject(); parameter1.Add("id", Plot.Id); parameter1.Add("tempId", float.NaN); parameter1.Add("state", Plot.State); parameter1.Add("itemName", Plot.ItemName); parameter1.Add("plantTime", Plot.PlantTime); parameter1.Add("direction", 0); parameter1.Add("isJumbo", Plot.IsJumbo); parameter1.Add("position", Plot.Position.ToObject()); parameter1.Add("isBigPlot", Plot.IsBigPlot); parameter1.Add("className", Plot.ClassName); parameter1.Add("deleted", false); parameter1.Add("isProduceItem", Plot.IsProduceItem); return new object[] { "clear", parameter1, new object[] { } }; }
/* * $amf->_bodys[0]->_value[1][0]['params'][1]['id'] = $id; $amf->_bodys[0]->_value[1][0]['params'][1]['plantTime'] = '0'; $amf->_bodys[0]->_value[1][0]['params'][1]['className'] = 'Plot'; $amf->_bodys[0]->_value[1][0]['params'][1]['isJumbo'] = false; $amf->_bodys[0]->_value[1][0]['params'][1]['state'] = 'withered'; $amf->_bodys[0]->_value[1][0]['params'][1]['direction'] = '0'; $amf->_bodys[0]->_value[1][0]['params'][1]['isBigPlot'] = false; $amf->_bodys[0]->_value[1][0]['params'][1]['position']['x'] = $x; $amf->_bodys[0]->_value[1][0]['params'][1]['position']['y'] = $y; $amf->_bodys[0]->_value[1][0]['params'][1]['position']['z'] = '0'; $amf->_bodys[0]->_value[1][0]['params'][1]['deleted'] = false; $amf->_bodys[0]->_value[1][0]['params'][1]['itemName'] = 'watermelonyellow'; $amf->_bodys[0]->_value[1][0]['params'][1]['isProduceItem'] = false; $amf->_bodys[0]->_value[1][0]['params'][2] = array(); */ public override object[] GetParameterArray() { Classes.ObjectPosition pos = new Classes.ObjectPosition() { X = _x, Y = _y, Z = 0 }; FluorineFx.ASObject parameter1 = new FluorineFx.ASObject(); parameter1.Add("id", _itemId); parameter1.Add("state", "withered"); parameter1.Add("itemName", _plantRequest); parameter1.Add("plantTime", (float)0); parameter1.Add("direction", 0); parameter1.Add("isJumbo", false); parameter1.Add("position", pos.ToObject()); parameter1.Add("isBigPlot", false); parameter1.Add("className", "Plot"); parameter1.Add("deleted", false); parameter1.Add("isProduceItem", false); FluorineFx.ASObject parameter2 = new FluorineFx.ASObject(); parameter2.Add("energyCost", 0); return new object[] { "harvest", parameter1, new object[] { parameter2 } }; }
/// <summary> /// 帰宅したかどうかを取得する /// </summary> /// <returns>帰宅したかどうか</returns> private bool IsReturnHome(FluorineFx.ASObject asObject) { Object miscObj = null; if (asObject.TryGetValue("misc", out miscObj) && miscObj != null) { FluorineFx.ASObject miscAsObj = (FluorineFx.ASObject)miscObj; Int32 finishType = -1; if (FiddlerUtil.IsExistObject(miscAsObj, "finishType")) { AMFUtil.GetInt32Value(miscAsObj, "finishType", out finishType); if (finishType == 0) // お使いから帰ってくると0が入っている { return(true); } } } return(false); }
/// <summary> /// FluorineFx.ASObjectからパースを行う /// </summary> public void Parse(FluorineFx.ASObject asObject) { AMFUtil.GetInt32Value(asObject, "likeFood", out likeFood); AMFUtil.GetInt32Value(asObject, "materialType", out materialType); AMFUtil.GetInt32Value(asObject, "hp", out hp); AMFUtil.GetInt32Value(asObject, "sellPrice", out sellPrice); AMFUtil.GetInt32Value(asObject, "type", out type); AMFUtil.GetInt32Value(asObject, "outingFeelFull", out outingFeelFull); AMFUtil.GetInt32Value(asObject, "skill2MstId", out skill2MstId); AMFUtil.GetInt32Value(asObject, "speed", out speed); AMFUtil.GetInt32Value(asObject, "battleFeelFull", out battleFeelFull); AMFUtil.GetInt32Value(asObject, "defense", out defense); AMFUtil.GetInt32Value(asObject, "attack", out attack); AMFUtil.GetStringValue(asObject, "name", out name); AMFUtil.GetStringValue(asObject, "nickname", out nickname); AMFUtil.GetInt32Value(asObject, "feelFullMax", out feelFullMax); AMFUtil.GetInt32Value(asObject, "skill1MstId", out skill1MstId); AMFUtil.GetStringValue(asObject, "kana", out kana); AMFUtil.GetInt32Value(asObject, "skill3MstId", out skill3MstId); AMFUtil.GetInt32Value(asObject, "cardMstId", out cardMstId); AMFUtil.GetInt32Value(asObject, "rarityMstId", out rarityMstId); }
/// <summary> /// AFMからパースする /// </summary> public static void Parse(FluorineFx.ASObject bodyAsObject) { Object itemMstObj = null; if (bodyAsObject.TryGetValue("itemMst", out itemMstObj)) { Object[] itemMstObjs = (Object[])itemMstObj; if (itemMstObjs != null) { ItemMstDatas.Clear(); for (int i = 0; i < itemMstObjs.Length; ++i) { FluorineFx.ASObject asObj = itemMstObjs[i] as FluorineFx.ASObject; if (asObj != null) { ItemMstData data = SubParse(asObj); ItemMstDatas.Add(data); } } } } }
private void ParseRefresh(FluorineFx.ASObject asObject) { Object refreshObj = null; if (asObject.TryGetValue("refresh", out refreshObj) && refreshObj != null) { Object[] refreshObjs = (Object[])refreshObj; if (refreshObjs != null) { mRefreshDatas.Clear(); for (int i = 0; i < refreshObjs.Length; ++i) { FluorineFx.ASObject asObj = refreshObjs[i] as FluorineFx.ASObject; RefreshData data = new RefreshData(); data.Parse(asObj); mRefreshDatas.Add(data); } } } }
/// <summary> /// AFMからパースする /// </summary> public static void Parse(FluorineFx.ASObject bodyAsObject) { Object girlLevelMstObj = null; if (bodyAsObject.TryGetValue("girlLevelMst", out girlLevelMstObj)) { Object[] girlLevelMstObjs = (Object[])girlLevelMstObj; if (girlLevelMstObjs != null) { GirlLevelMstDatas.Clear(); for (int i = 0; i < girlLevelMstObjs.Length; ++i) { FluorineFx.ASObject asObj = girlLevelMstObjs[i] as FluorineFx.ASObject; if (asObj != null) { GirlLevelMstData data = SubParse(asObj); GirlLevelMstDatas.Add(data); } } } } }
public override object[] GetParameterArray() { FluorineFx.ASObject parameter1 = new FluorineFx.ASObject(); parameter1.Add("id", Plot.Id); parameter1.Add("tempId", float.NaN); parameter1.Add("state", "planted"); parameter1.Add("itemName", PlantRequest); parameter1.Add("plantTime", (float)((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds * 1000)); SentPlantTime = (float)((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds * 1000); parameter1.Add("direction",0); parameter1.Add("isJumbo", Plot.IsJumbo); parameter1.Add("position", Plot.Position.ToObject()); parameter1.Add("isBigPlot", Plot.IsBigPlot); parameter1.Add("className", Plot.ClassName); parameter1.Add("deleted", false); parameter1.Add("isProduceItem", Plot.IsProduceItem); FluorineFx.ASObject parameter2 = new FluorineFx.ASObject(); parameter2.Add("energyCost", 0); parameter2.Add("isGift", false); return new object[]{ "place", parameter1, new object[] { parameter2 } }; }
/// <summary> /// FluorineFx.ASObjectからパースを行う /// </summary> public void Parse(FluorineFx.ASObject asObject) { AMFUtil.GetInt32Value(asObject, "defenseBonus", out defenseBonus); AMFUtil.GetInt32Value(asObject, "love", out love); AMFUtil.GetInt32Value(asObject, "skill2Exp", out skill2Exp); AMFUtil.GetInt32Value(asObject, "critical", out critical); AMFUtil.GetInt32Value(asObject, "deckId", out deckId); AMFUtil.GetInt32Value(asObject, "hp", out hp); AMFUtil.GetInt32Value(asObject, "skill1ExpMaxForNextLevel", out skill1ExpMaxForNextLevel); AMFUtil.GetInt32Value(asObject, "hpBonus", out hpBonus); AMFUtil.GetInt32Value(asObject, "skill3ExpMaxForNextLevel", out skill3ExpMaxForNextLevel); AMFUtil.GetStringValue(asObject, "lostTime", out lostTime); AMFUtil.GetInt32Value(asObject, "speedBonus", out speedBonus); AMFUtil.GetInt32Value(asObject, "speed", out speed); AMFUtil.GetInt32Value(asObject, "attackBonus", out attackBonus); AMFUtil.GetInt32Value(asObject, "hpMax", out hpMax); AMFUtil.GetInt32Value(asObject, "hit", out hit); AMFUtil.GetInt32Value(asObject, "skill2Level", out skill2Level); AMFUtil.GetInt32Value(asObject, "defense", out defense); AMFUtil.GetInt32Value(asObject, "attack", out attack); AMFUtil.GetBooleanValue(asObject, "isLocked", out isLocked); AMFUtil.GetInt32Value(asObject, "exp", out exp); AMFUtil.GetInt32Value(asObject, "skill2ExpMaxForNextLevel", out skill2ExpMaxForNextLevel); AMFUtil.GetInt32Value(asObject, "tension", out tension); AMFUtil.GetInt32Value(asObject, "skill1Exp", out skill1Exp); AMFUtil.GetInt32Value(asObject, "skill3Exp", out skill3Exp); AMFUtil.GetInt32Value(asObject, "level", out level); AMFUtil.GetBooleanValue(asObject, "isLeader", out isLeader); AMFUtil.GetInt32Value(asObject, "skill3Level", out skill3Level); AMFUtil.GetInt32Value(asObject, "orderInDeck", out orderInDeck); AMFUtil.GetInt32Value(asObject, "feelFull", out feelFull); AMFUtil.GetInt32Value(asObject, "cardId", out cardId); AMFUtil.GetInt32Value(asObject, "skill1Level", out skill1Level); AMFUtil.GetInt32Value(asObject, "rebirthCount", out rebirthCount); AMFUtil.GetInt32Value(asObject, "evasion", out evasion); AMFUtil.GetInt32Value(asObject, "cardMstId", out cardMstId); AMFUtil.GetInt32Value(asObject, "expMaxForNextLevel", out expMaxForNextLevel); AMFUtil.GetInt32Value(asObject, "status", out status); }
public void Parse(FluorineFx.ASObject asObject) { if (asObject != null) { AMFUtil.GetStringValue(asObject, "volumeSe", out volumeSe); AMFUtil.GetInt32Value(asObject, "attackBoost", out attackBoost); AMFUtil.GetBooleanValue(asObject, "isMute", out isMute); AMFUtil.GetInt32Value(asObject, "foodRecoverMax", out foodRecoverMax); AMFUtil.GetInt32Value(asObject, "stamina", out stamina); AMFUtil.GetInt32Value(asObject, "vegetable", out vegetable); AMFUtil.GetStringValue(asObject, "meatLostTime", out meatLostTime); AMFUtil.GetInt32Value(asObject, "foodMax", out foodMax); AMFUtil.GetDoubleValue(asObject, "exp", out exp); AMFUtil.GetInt32Value(asObject, "battleWinCount", out battleWinCount); AMFUtil.GetStringValue(asObject, "vegitableLostTime", out vegitableLostTime); AMFUtil.GetDoubleValue(asObject, "playerId", out playerId); AMFUtil.GetInt32Value(asObject, "outingSuccessCount", out outingSuccessCount); AMFUtil.GetInt32Value(asObject, "bread", out bread); AMFUtil.GetStringValue(asObject, "volumeVoice", out volumeVoice); AMFUtil.GetBooleanValue(asObject, "isLeave", out isLeave); AMFUtil.GetInt32Value(asObject, "level", out level); AMFUtil.GetStringValue(asObject, "start", out start); AMFUtil.GetStringValue(asObject, "volumeBgm", out volumeBgm); AMFUtil.GetStringValue(asObject, "breadLostTime", out breadLostTime); AMFUtil.GetDoubleValue(asObject, "userId", out userId); AMFUtil.GetInt32Value(asObject, "ruby", out ruby); AMFUtil.GetInt32Value(asObject, "cardMax", out cardMax); AMFUtil.GetInt32Value(asObject, "expBoost", out expBoost); AMFUtil.GetInt32Value(asObject, "outingCount", out outingCount); AMFUtil.GetStringValue(asObject, "name", out name); AMFUtil.GetInt32Value(asObject, "meat", out meat); AMFUtil.GetInt32Value(asObject, "defenseBoost", out defenseBoost); AMFUtil.GetInt32Value(asObject, "jobCount", out jobCount); AMFUtil.GetInt32Value(asObject, "battleCount", out battleCount); AMFUtil.GetInt32Value(asObject, "tutorialState", out tutorialState); AMFUtil.GetDoubleValue(asObject, "expMaxForNextLevel", out expMaxForNextLevel); } }
internal void NewMessage(FluorineFx.ASObject msg) { string ChatText = msg["text"].ToString(); DateTime time = DateTime.Parse(msg["time"].ToString()); var Name = msg["sender"] as FluorineFx.ASObject; string Sender = Name["name"].ToString(); Console.WriteLine(Sender + " [" + time.ToString() + "] - " + ChatText); ChatMessage chatMessage = new ChatMessage() { Date = time, Name = Sender, Text = ChatText }; if (OnNewMessagesArrived != null) { List <ChatMessage> l = new List <ChatMessage>(); l.Add(chatMessage); OnNewMessagesArrived(l); } }
private void ParsePlayer(FluorineFx.ASObject asObject) { Object playerObj = null; if (asObject.TryGetValue("player", out playerObj) && playerObj != null) { Type varType = playerObj.GetType(); if (varType == typeof(FluorineFx.ASObject)) { FluorineFx.ASObject asObj = (FluorineFx.ASObject)playerObj; if (asObj != null) { PlayerData playerData = new PlayerData(); playerData.Parse(asObj); // 1つなので常に上書きする mPlayerData = playerData; // ユーザー情報にも保持されている値に反映する ApplyToUserData(); } } } }
/// <summary> /// AFMからパースする /// </summary> public static void Parse(FluorineFx.ASObject bodyAsObject) { Object mstObj = null; if (bodyAsObject.TryGetValue("productMst", out mstObj)) { Object[] mstObjs = (Object[])mstObj; if (mstObjs != null) { ProductMstDatas.Clear(); for (int i = 0; i < mstObjs.Length; ++i) { FluorineFx.ASObject asObj = mstObjs[i] as FluorineFx.ASObject; if (asObj != null) { ProductMstData data = new ProductMstData(); data.Parse(asObj); ProductMstDatas.Add(data); } } } } }
/// <summary> /// AFMからパースする /// </summary> public static void Parse(FluorineFx.ASObject bodyAsObject) { Object cardMstObj = null; if (bodyAsObject.TryGetValue("cardMst", out cardMstObj)) { Object[] cardMstObjs = (Object[])cardMstObj; if (cardMstObjs != null) { CardMstDatas.Clear(); for (int i = 0; i < cardMstObjs.Length; ++i) { FluorineFx.ASObject asObj = cardMstObjs[i] as FluorineFx.ASObject; if (asObj != null) { CardMstData data = new CardMstData(); data.Parse(asObj); CardMstDatas.Add(data); } } } } }
private void ParseDeck(FluorineFx.ASObject asObject) { // 配列の時と、そうでない時がある。 // 前者はグループ編成画面を開いた時、後者は戦闘開始前やお使い終了時など。 Object deckObj = null; if (asObject.TryGetValue("deck", out deckObj) && deckObj != null) { Object[] deckObjs = null; // 単体の時 Type varType = deckObj.GetType(); if (varType == typeof(FluorineFx.ASObject)) { deckObjs = new FluorineFx.ASObject[1]; deckObjs[0] = (FluorineFx.ASObject)deckObj; } // 配列の時 else if(varType == typeof(Object[])) { deckObjs = (Object[])deckObj; } for (Int32 i = 0; i < deckObjs.Length; ++i) { FluorineFx.ASObject asObj = (FluorineFx.ASObject)deckObjs[i]; if (asObj != null) { DeckData parseData = new DeckData(); parseData.Parse(asObj); // 既出なら上書きする Int32 findDataIndex = mDeckDatas.FindIndex( delegate(DeckData a) { return (a.deckId == parseData.deckId); } ); if (0 <= findDataIndex) { mDeckDatas[findDataIndex] = parseData; } // 新出なら追加する else { mDeckDatas.Add(parseData); } } } // ID昇順でソートする mDeckDatas.Sort( delegate(DeckData a, DeckData b) { return a.deckId - b.deckId; } ); } }
/// <summary> /// card情報をパースする /// </summary> /// <param name="asObject"></param> private void ParseCard(FluorineFx.ASObject asObject) { Object cardObj = null; if (asObject.TryGetValue("card", out cardObj) && cardObj != null) { Object[] cardObjs = null; // 配列の時とそうでない時の両方に対応する Type varType = cardObj.GetType(); if (varType == typeof(FluorineFx.ASObject)) { cardObjs = new FluorineFx.ASObject[1]; cardObjs[0] = (FluorineFx.ASObject)cardObj; } else if (varType == typeof(Object[])) { cardObjs = (Object[])cardObj; // cardは強化合成や限界突破によって容易く減る機会が多い // 配列の場合、全情報が入っていると思いたいが食事の時は対象となるモン娘の情報しかない // この違いを"misc"があるかどうかで判断する。あればクリアする。 if (FiddlerUtil.IsExistObject(asObject, FiddlerUtil.KeyNameType.MISC) && // "misc"があってもお使いからの帰宅時は対象外 !IsReturnHome(asObject)) { mCardDatas.Clear(); } } for (int i = 0; i < cardObjs.Length; ++i) { FluorineFx.ASObject asObj = cardObjs[i] as FluorineFx.ASObject; if (asObj != null) { CardData parseData = new CardData(); parseData.Parse(asObj); // 既出なら更新する Int32 findDataIndex = mCardDatas.FindIndex( delegate(CardData inData) { return (inData.cardId == parseData.cardId); } ); if (0 <= findDataIndex) { mCardDatas[findDataIndex] = parseData; } // 新出なら追加する else { mCardDatas.Add(parseData); } } } // ソートする mCardDatas.Sort( delegate(CardData a, CardData b) { return a.cardId - b.cardId; } ); } }
public virtual FluorineFx.ASObject ToObject() { FluorineFx.ASObject pos = new FluorineFx.ASObject(); pos.Add("x", _x); pos.Add("y", _y); pos.Add("z", _z); return pos; }
private void ParseItem(FluorineFx.ASObject asObject) { Object itemObj = null; if (asObject.TryGetValue("item", out itemObj) && itemObj != null) { // 配列の時とそうでない時の両方に対応する Object[] itemObjs = null; Type varType = itemObj.GetType(); if (varType == typeof(FluorineFx.ASObject)) { itemObjs = new FluorineFx.ASObject[1]; itemObjs[0] = (FluorineFx.ASObject)itemObj; } else if (varType == typeof(Object[])) { itemObjs = (Object[])itemObj; } for (int i = 0; i < itemObjs.Length; ++i) { FluorineFx.ASObject asObj = itemObjs[i] as FluorineFx.ASObject; ItemData data = new ItemData(); data.Parse(asObj); // 既出なら上書きする Int32 findDataIndex = mItemDatas.FindIndex( delegate(ItemData inData) { return inData.itemMstId == data.itemMstId; } ); if (0 <= findDataIndex) { // お使いから帰ってきた場合、増加値が返る。 // 結果の値はプレイヤー情報に入っているので、ここでは処理しない。 bool isOverride = !IsReturnHome(asObject); if (isOverride) { mItemDatas[findDataIndex] = data; } } // 新出なら追加する else { mItemDatas.Add(data); } } } }