public void WingEquip(int wingid, int action) { WingData wingData = PlayerDataPool.Instance.MainData.mWingData; WingItemData itemData = wingData.GetWingItemDataById(wingid); WingCommonTableItem commonRes = DataManager.WingCommonTable[wingid] as WingCommonTableItem; string modelName = WingModule.GetModelName(wingid, itemData.level); int wingeffectId = WingModule.GetEffectId(wingid, (int)itemData.level); if (action == 0) { RemoveAttach(AttachMountType.Wing); GameDebug.Log("装备翅膀"); ChangeAttach(AttachMountType.Wing, AssetConfig.WeaponPath + modelName, commonRes.modelSlot); if (wingeffectId != -1) { AddEffect((uint)wingeffectId, null, float.NaN, AttachMountType.Wing); } } else { GameDebug.Log("卸载翅膀"); RemoveAttach(AttachMountType.Wing); } }
public WingItem(WingData res) { marketItemType = MarkItemType.WingItem; resData = res; name = GetName(res.name); icon = GetIcon(res.icon); }
private static string BeeLikeTransformStr(WingData previousWingData, PlayerBase player) { if (previousWingData.type == WingType.NONE) { string sizeText = player.wings.isLarge ? " As you do, you briefly lift off the ground. It seems like they are large enough to fly with! " : " Unfortunately you can't seem to flap your little wings fast enough to fly, but they would certainly slow a fall. "; string armorText = player.wearingArmor ? "You hastily remove the top portion of your " + player.armor.ItemName() + " and marvel as " : "Checking your exposed back, you can't help but marvel as "; string modifyText = player.wearingArmor ? "A few quick modifications to your " + player.armor.ItemName() + " later and" : "Once you figure out how to handle your wings when you aren't using them,"; return("You feel an itching between your shoulder-blades as something begins growing there." + " You twist and contort yourself, trying to scratch and bring yourself relief, and failing miserably." + " A sense of relief erupts from you as you feel something new grow out from yourbody. " + armorText + player.wings.LongDescription() + " sprout from your back. Tenderly flexing your new muscles, you find you can flap them quite fast. " + sizeText + modifyText + " you are ready to continue your journey with " + SafelyFormattedString.FormattedText("your new bee wings!", StringFormats.BOLD)); } else { string sizeText = player.wings.isLarge ? " A quick flap of your now bee-like wings confirms they are large enough to fly with!" : " A quick flap of your now bee-like wings confirms they are too small to fly with, unfortunately."; return("you feel a strange substance suddenly coating your wings. Bringing a " + player.hands.ShortDescription(false) + " to them, you notice it's sticky, " + "and you're pretty sure it's honey. Before you have time to confirm your suspicion, your " + previousWingData.ShortDescription() + "fully convert into the " + "honey-like substance and fall off your back in a giant, goopy mess. Some of the substance remains on you, where your old, " + previousWingData.LongDescription() + " met your back. You go to wipe it off when you notice " + player.wings.LongDescription(true, true) + " sprouting there. " + SafelyFormattedString.FormattedText("You now have a pair of bee wings!", StringFormats.BOLD) + sizeText); } }
public PlayerData() { name = "Brink"; level = 1; //temp 1 resId = 1; vip_value = 0; vip_level = 0; main_weaponId = 1000; exp = 0; mStrenLv = 0; mPack = new PackageManager(); sp = 0; sp_max = 0; sp_next_inc_time = ulong.MaxValue; mFittChance = 3; arena_currank = uint.MaxValue; arena_bestrank = uint.MaxValue; arena_score = 0; arena_lefttimes = 0; arena_buytimes = 0; arena_lasttime = 0; qualifying_currank = uint.MaxValue; qualifying_bestrank = uint.MaxValue; qualifying_lefttimes = 0; qualifying_buytimes = 0; qualifying_lasttime = 0; next_daily_resettime = ulong.MaxValue; rmb_used = 0; for (uint i = 0; i < mProceeds.Length; ++i) { mProceeds[i] = 0; } mWingData = new WingData(); skillData.Clear(); mChallengeStage.Clear(); mWingData.Clear(); // for(int i = 1 ; i < 13 ; i++) // { // if(skillData.mLevels.ContainsKey(i)) // skillData.mLevels[i] = 1; // else // skillData.mLevels.Add(i , 1); // } for (uint i = 0; i < (uint)FittingsType.MAX_FITTGINS; i++) { mFittings[i] = new FittingsData(); } mStageData.Clear(); mActivity.mActivityTypeCompletedTime.Clear(); mActivity.mHasCompletedActivity.Clear(); mZonesData.Clear(); mCropsData.Clear(); weapon_skill_unlocked = false; firstCharge = false; firstCharge_picked = false; }
/// <summary> /// 为角色初始化第一阶段的翅膀 /// </summary> /// <param name="client"></param> public static void InitFirstWing(GameClient client) { if (null == client.ClientData.MyWingData) { WingData wingData = AddWingDBCommand(TCPOutPacketPool.getInstance(), client.ClientData.RoleID, 1, client.ServerId); //获取得到第一阶翅膀 client.ClientData.MyWingData = wingData; } }
private void AddWingModel() { WingData wingData = PlayerDataPool.Instance.MainData.mWingData; if (wingData.mWearId != -1) { WingEquip(wingData.mWearId, 0); } }
public static void writeWing(this IPersistableWriter w, Wing wing) { var wd = new WingData(wing); w.Write(wing.uid); w.Write(wd.name); w.Write((int)wd.wingClass); w.Write(wd.energy); w.writePersonality(wd.ply); w.Write(wd.armed); }
public List <int> GetUnlockWing() { List <int> re = new List <int>(); WingData wd = PlayerDataPool.Instance.MainData.mWingData; for (int i = 0; i < wd.wingItems.Count; ++i) { re.Add(wd.wingItems[i].id); } return(re); }
public static WingData readWing(this IPersistableReader r) { var wd = new WingData(); wd.uid = r.ReadLong(); wd.name = r.ReadString(); wd.wingClass = (Wing.WingClass)r.ReadInt(); wd.energy = r.ReadFloat(); wd.ply = r.readPersonality(); wd.armed = r.ReadBool(); return(wd); }
public bool GetWingItemData(int curPageNum, out WingItemData itemdata) { WingData wd = PlayerDataPool.Instance.MainData.mWingData; if (mCurPageNum > wd.wingItems.Count) { itemdata = null; GameDebug.Log("获取翅膀数ItemData据失败"); return(false); } itemdata = PlayerDataPool.Instance.MainData.mWingData.wingItems[curPageNum - 1]; return(true); }
public int GetWingPageCount() { WingData wd = PlayerDataPool.Instance.MainData.mWingData; if (wd.wingItems.Count == DataManager.WingCommonTable.Count) { return(wd.wingItems.Count); } else { return(wd.wingItems.Count + 1); } }
//taken from shriveled tentacle and snake oil. imo the shriveled tentacle one is better, but the whole shriveling thing might be thematic. so i kept both, and you get them randomly. private static string GenericRestoreText(WingData originalWings, PlayerBase player) { if (Utils.RandBool()) { return("Your wings twitch and flap involuntarily. You crane your neck to look at them as best you are able. From what you can see, they " + "seem to be shriveling and curling up. They're starting to look a lot like they did when they first popped out, wet and new. " + SafelyFormattedString.FormattedText("As you watch, they shrivel all the way, then recede back into your body.", StringFormats.BOLD)); } else { return("A wave of tightness spreads through your back, and it feels as if someone is stabbing a dagger into each of your shoulder-blades. " + "After a moment the pain passes, and you realize " + SafelyFormattedString.FormattedText("your wings are gone!", StringFormats.BOLD)); } }
private void UpdateProperty() { WingProperty wp = new WingProperty(); foreach (var item in m_wings) { WingData d = WingData.dataMap.Get(item.Value.id); WingLevelData wld = d.GetLevelData(item.Value.level); PropertyEffectData p = wld.GetProperEffectData(); wp.AddProperty(p); } List <string> attrs = wp.GetPropertEffect(); WingUILogicManager.Instance.SetWingAttribute(attrs); }
private void Preview(MarketItem data) { preview = data; int id = ItemEffectData.dataMap[ItemMaterialData.dataMap[data.resData.itemId].effectId].reward1[13]; m_myself.PreviewWing(id); WingData d = WingData.dataMap.Get(id); WingLevelData ld = d.GetLevelData(1); List <string> attrs = ld.GetPropertEffect(); WingUIPreviewInMarketUILogicManager.Instance.SetTitle(LanguageData.GetContent(d.name)); WingUIPreviewInMarketUILogicManager.Instance.SetTipAttr(attrs); WingUIPreviewInMarketUILogicManager.Instance.SetWingAttr(attrs); WingUIPreviewInMarketUILogicManager.Instance.SetUIDirty(); MFUIManager.GetSingleton().SwitchUIWithLoad(MFUIManager.MFUIID.WingPreviewInMarketUI); }
private void UpdateUpgradeContent() { WingData wd = tipData; WingLevelData wld = wd.GetLevelData(m_wings[wd.id].level); WingLevelData wnld = wd.GetLevelData(m_wings[wd.id].level + 1); WingUIViewManager.Instance.SetWingTipTitle(LanguageData.GetContent(wd.name)); List <string> attrs = wld.GetPropertEffect(); List <string> nextAttrs = null; if (wnld != null) { nextAttrs = wnld.GetPropertEffect(); WingUIUpgradeDialogLogicManager.Instance.SetUpgradeDialogCost("x" + wnld.trainDiamondCost); WingUIUpgradeDialogLogicManager.Instance.SetUpgradeDialogNextLevel(LanguageData.GetContent(200005, wnld.level)); } WingUIUpgradeDialogLogicManager.Instance.SetUpgradeDialogCurrentLevel(LanguageData.GetContent(200005, wld.level)); WingUIUpgradeDialogLogicManager.Instance.SetUpgradeDialogIcon(IconData.GetIconPath(wd.icon)); WingUIUpgradeDialogLogicManager.Instance.SetUpgradeDialogTitle(LanguageData.GetContent(wd.name)); Wing w = m_wings[wd.id]; float p = 0; if (wld.nextLevelExp == 0) { p = 1; WingUIUpgradeDialogLogicManager.Instance.SetUpgradeDialogProgressText(w.exp + "/" + w.exp); } else { p = (float)w.exp / (float)wld.nextLevelExp; WingUIUpgradeDialogLogicManager.Instance.SetUpgradeDialogProgressText(w.exp + "/" + wld.nextLevelExp); } WingUIUpgradeDialogLogicManager.Instance.SetUpgradeDialogProgressSize(p); for (int i = 0; i < attrs.Count; i++) { WingUIUpgradeDialogLogicManager.Instance.SetUpgradeDialogCurrentAttr(attrs[i], i); if (nextAttrs != null) { WingUIUpgradeDialogLogicManager.Instance.SetUpgradeDialogNextAttr(nextAttrs[i], i); } else { WingUIUpgradeDialogLogicManager.Instance.SetUpgradeDialogNextAttr("", i); } } WingUIUpgradeDialogLogicManager.Instance.SetUIDirty(); }
private static string FeatheredLongDesc(WingData wings, bool alternateFormat, bool plural) { string intro; if (wings.isLarge) { if (alternateFormat && plural) { intro = "a pair of "; } else if (alternateFormat) { intro = "a "; } else if (plural) { intro = "pair of "; } else { intro = ""; } return(intro + Utils.PluralizeIf("large wing", plural) + " covered in " + wings.featherColor.AsString() + " feathers"); } else { if (alternateFormat && plural) { intro = "a pair of " + wings.featherColor.AsString(); } else if (alternateFormat) { intro = Utils.AddArticle(wings.featherColor.AsString()); } else if (plural) { intro = "pair of " + wings.featherColor.AsString(); } else { intro = wings.featherColor.AsString(); } return(intro + Utils.PluralizeIf("harpy wing", plural)); } }
private void AddWingSkillBuff() { WingData wingData = PlayerDataPool.Instance.MainData.mWingData; if (mScene.getType() == SceneType.SceneType_City) { return; } for (int i = 0; i < wingData.wingItems.Count; ++i) { WingLevelTableItem levelRes = wingData.GetLevelRes(i); if (levelRes != null && levelRes.buffid != -1) { AddSkillEffect(new AttackerAttr(this), SkillEffectType.Buff, System.Convert.ToUInt32(levelRes.buffid)); GameDebug.Log("添加翅膀buff:" + levelRes.buffid); } } }
public bool RequestEquip() { WingEquipActionParam param = new WingEquipActionParam(); WingData wd = PlayerDataPool.Instance.MainData.mWingData; if (wd.mWearId == wd.wingItems[mCurPageNum - 1].id) { param.action = 1; } else { param.action = 0; } param.wingid = wd.wingItems[mCurPageNum - 1].id; Net.Instance.DoAction((int)MESSAGE_ID.ID_MSG_WING_EQUIP, param); return(true); }
private static string FeatheredTransformStr(WingData previousWingData, PlayerBase player) { string intro = "Pain "; //someone took care of other wing types so i didn't have to do it manually! WOOOO!!! if (previousWingData.type != NONE) { intro = $"Sensation fades from your {previousWingData.LongDescription()} slowly but surely, leaving them dried out husks that break off to fall on the" + " ground. Your back closes up to conceal the loss, as smooth and unbroken as any normal human's. Before you can process the loss, pain "; } return(intro + "lances through your back, the muscles knotting oddly and pressing up to bulge your skin. It hurts, oh gods does" + " it hurt, but you can't get a good angle to feel at the source of your agony. A loud crack splits the air, and then your" + " body is forcing a pair of narrow limbs through a gap in your comfortable clothes. Blood pumps through the new" + " appendages, easing the pain as they fill out and grow. Tentatively, you find yourself flexing muscles you didn't know" + " you had, and " + SafelyFormattedString.FormattedText("you're able to curve the new growths far enough around to behold your brand new, " + player.wings.featherColor.AsString() + " wings", StringFormats.BOLD)); }
private static string ImpTransformStr(WingData previousWingData, PlayerBase player) { if (previousWingData.type == NONE) { string armorText = player.wearingArmor ? "ripping a pair of holes in the back of your " + player.armor.ItemName() + "." : "and you're glad you aren't wearing any armor because they might've ripped through it."; return("A knot of pain forms in your shoulders as they tense up. With a surprising force, " + player.wings.LongDescription(true, true) + " sprout from your back, " + armorText + SafelyFormattedString.FormattedText("You now have " + player.wings.LongDescription() + "!", StringFormats.BOLD)); } else { return("The muscles around your shoulders bunch up uncomfortably, changing to support your wings as you feel their weight increasing. You twist your head " + "as far as you can for a look and realize they've changed into " + SafelyFormattedString.FormattedText((player.wings.isLarge ? "large, " : "small, ") + "imp-like wings!", StringFormats.BOLD)); } }
public bool processCmd(GameClient client, string[] cmdParams) { int nID = 678; int roleID = Global.SafeConvertToInt32(cmdParams[0]); bool result; if (null == client.ClientData.MyWingData) { WingData wingData = new WingData(); client.sendCmd <WingData>(nID, wingData, false); result = true; } else { client.sendCmd <WingData>(nID, client.ClientData.MyWingData, false); result = true; } return(result); }
private void OpenBuy(int id, int diamond) { int iid = ItemEffectData.dataMap[ItemMaterialData.dataMap[id].effectId].reward1[13];//13是reward1中的翅膀类型 MFUIManager.GetSingleton().SwitchUIWithLoad(MFUIManager.MFUIID.WingUIBuyDialog, MFUIManager.MFUIID.None, 0, true); WingData d = WingData.dataMap.Get(iid); WingLevelData ld = d.GetLevelData(1); WingUIBuyDialogLogicManager.Instance.SetBuyDialodTitle(LanguageData.GetContent(d.name)); List <string> attrs = ld.GetPropertEffect(); for (int i = 0; i < attrs.Count; i++) { WingUIBuyDialogLogicManager.Instance.SetBuyDialogAttr(attrs[i], i); } WingUIBuyDialogLogicManager.Instance.SetBuyDialogCost(" " + diamond); WingUIBuyDialogLogicManager.Instance.SetBuyDialogIcon(IconData.dataMap.Get(ItemMaterialData.dataMap[id].icon).path); WingUIBuyDialogLogicManager.Instance.SetUIDirty(); }
private static string DraconicTransformStr(WingData previousWingData, PlayerBase player) { if (previousWingData.type == NONE) { string sizeText = player.wings.isLarge ? SafelyFormattedString.FormattedText("You now have large dragon wings! They're powerful enough to lift you into the air with just one flap!", StringFormats.BOLD) : SafelyFormattedString.FormattedText("You now have small dragon wings! They're not big enough to fly with, but they look adorable.", StringFormats.BOLD); return("You double over as waves of pain suddenly fill your shoulderblades; your back feels like it's swelling, flesh and muscles ballooning. " + "A sudden sound of tearing brings with it relief and you straighten up. Upon your back now sit small, leathery wings, not unlike a bat's. " + sizeText); } else { return("A sensation of numbness suddenly fills your wings. When it dies away, they feel... different. Looking back, you realize that they have been replaced by new, " + (player.wings.isLarge ? "large" : "small") + " wings, ones that you can only describe as draconic. " + SafelyFormattedString.FormattedText("Your wings have changed into dragon wings!", StringFormats.BOLD)); } }
protected override string RestoredBackAndWings(Creature target, WingData oldWings, BackData oldBack) { string missing; if (oldBack.type == BackType.SHARK_FIN && !oldWings.isDefault) { missing = "shark-like fin and wings are both"; } else if (oldBack.type == BackType.SHARK_FIN) { missing = "shark-like fin is"; } else { missing = "wings are"; } return(GlobalStrings.NewParagraph() + "A wave of tightness spreads through your back, and it feels as if someone is stabbing a dagger into your spine." + " After a moment the pain passes, though your " + missing + " gone!"); }
/// <summary> /// 处理翅膀佩戴/下载指令 /// </summary> public bool processCmd(GameClient client, string[] cmdParams) { int nID = (int)TCPGameServerCmds.CMD_SPR_GETWINGINFO; int roleID = Global.SafeConvertToInt32(cmdParams[0]); string strcmd = ""; if (null == client.ClientData.MyWingData) { WingData wingData = new WingData(); client.sendCmd <WingData>(nID, wingData); return(true); } else { client.sendCmd <WingData>(nID, client.ClientData.MyWingData); return(true); } return(true); }
public GhostData() { name = "Brink"; level = 1; resId = 1; main_weaponId = 1000; sub_weaponId = 1000; mStrenLv = 0; for (uint i = 0; i < (uint)FittingsType.MAX_FITTGINS; i++) { mFittings[i] = new FittingsData(); } skillData.Clear(); mWingData = new WingData(); mFashionData = new PlayerFashionData(); mWingData.Clear(); mMainCropsInfo.Clear(); mSubCropsInfo.Clear(); }
private static string DragonflyTransformStr(WingData previousWingData, PlayerBase player) { string intro; if (previousWingData.type == NONE) { intro = "You scream and fall to your knees as incredible pain snags at your shoulders, as if needle like hooks were being sunk into your flesh, " + "just below your shoulder blades. After about five seconds of white hot, keening agony it is with almost sexual relief that something splits out of your upper back. " + "You clench the dirt as you slide what feel like giant leaves of paper into the open air. Eventually the sensation passes and you groggily get to your feet. "; } else { intro = "You scream and fall to your knees as incredible pain flows through your " + previousWingData.LongDescription() + ". You gasp as they being to shift and reform," + "becoming almost paper thin. It takes about five seconds too complete, and the sudden relief from the indescribable agony is almost orgasmic. "; } return(intro + "You can barely believe what you can see by craning your neck behind you - " + SafelyFormattedString.FormattedText("you've grown a set of four giant dragonfly wings", StringFormats.BOLD) + ", thinner, longer and more pointed than the ones " + "you've seen upon the forest bee girls, but no less diaphanous and beautiful. You cautiously flex the new muscle groups in your shoulder blades and gasp " + "as your new wings whirr and lift you several inches off the ground. What fun this is going to be!"); }
private static string ImpLongDesc(WingData wings, bool alternateFormat, bool plural) { string intro = ""; if (alternateFormat && plural) { intro = "a pair of "; } else if (alternateFormat) { intro = "a "; } else if (plural) { intro = "pair of "; } else { intro = ""; } return(intro + ImpDesc(wings.isLarge)); }
private static string DragonflyLongDesc(WingData wings, bool alternateFormat, bool plural) { string intro = ""; if (alternateFormat && plural) { intro = "a pair of "; } else if (alternateFormat) { intro = "a "; } else if (plural) { intro = "pair of "; } else { intro = ""; } return(intro + DragonflyDesc()); }
private static string DraconicLongDesc(WingData wings, bool alternateFormat, bool plural) { string intro = ""; if (alternateFormat && plural) { intro = "a pair of " + wings.wingTone.AsString(); } else if (alternateFormat) { intro = Utils.AddArticle(wings.wingTone.AsString()); } else if (plural) { intro = "pair of " + wings.wingTone.AsString(); } else { intro = wings.wingTone.AsString(); } return(intro + " " + DraconicDesc(wings.isLarge, plural)); }
private void OpenTip(int idx) { WingGridData d = m_grids[idx]; if (page == 0) { d = m_common[idx]; } else if (page == 1) { d = m_magic[idx]; } m_self.PreviewWing(d.wingId); WingData wd = WingData.dataMap.Get(d.wingId); tipData = wd; WingLevelData wld = wd.GetLevelData(1); WingLevelData wnld = wd.GetLevelData(2); if (m_wings.ContainsKey(wd.id)) { wld = wd.GetLevelData(m_wings[wd.id].level); wnld = wd.GetLevelData(m_wings[wd.id].level + 1); } if (m_wings.ContainsKey(d.wingId)) { WingUIViewManager.Instance.ShowTipUpgradeBtn(wd.type == 1); if (wd.type == 1) { WingUIViewManager.Instance.ShowTipBuyBtn(d.wingId != dressed); } else { WingUIViewManager.Instance.ShowTipBuyBtn(d.wingId != dressed && d.IsActive); } WingUIViewManager.Instance.SetBuyText(LanguageData.GetContent(47281)); } else { WingUIViewManager.Instance.ShowTipUpgradeBtn(false); WingUIViewManager.Instance.ShowTipBuyBtn(false); //wd.type == 1); WingUIViewManager.Instance.SetBuyText(LanguageData.GetContent(1026)); } WingUIViewManager.Instance.SetWingTipTitle(LanguageData.GetContent(wd.name)); List<string> attrs = wld.GetPropertEffect(); PropertyEffectData a = wld.GetProperEffectData(); List<string> nextAttrs = null; if (wnld != null) { nextAttrs = wnld.GetPropertEffect(); } for (int i = 0; i < attrs.Count; i++) { WingUIViewManager.Instance.SetWingTipAttrDescripe("", i); WingUIViewManager.Instance.SetWingTipCurAttr(attrs[i], i); if (nextAttrs != null) { WingUIViewManager.Instance.SetWingTipNextAttr(nextAttrs[i], i); } else { WingUIViewManager.Instance.SetWingTipNextAttr("", i); } } }