Esempio n. 1
0
File: Member.cs Progetto: radtek/Pos
        Member(Account account,
               Profile profile,
               MiscInfo miscInfo,
               string uuid                       = null,
               string activation_token           = "",
               bool activated                    = false,
               string earned_points              = "0.0",
               string loaded_points              = "0.0",
               string member_type                = "0",
               string current_year_point         = "0.0",
               string previous_year_point        = "0.0",
               string available_birthday_point   = "0.0",
               string available_firstvisit_point = "0.0")
        {
            if (uuid == null)
            {
                uuid = Guid.NewGuid().ToString();
            }

            this.account                    = account;
            this.profile                    = profile;
            this.member_misc_info           = miscInfo;
            this.uuid                       = uuid;
            this.activation_token           = activation_token;
            this.activated                  = activated;
            this.earned_points              = earned_points;
            this.loaded_points              = loaded_points;
            this.member_type                = member_type;
            this.current_year_point         = current_year_point;
            this.previous_year_point        = previous_year_point;
            this.available_birthday_point   = available_birthday_point;
            this.available_firstvisit_point = available_firstvisit_point;
        }
Esempio n. 2
0
 public String getMisc(string key)
 {
     if (MiscInfo.ContainsKey(key))
     {
         return(MiscInfo[key]);
     }
     return(null);
 }
Esempio n. 3
0
        public IActionResult Get()
        {
            var data = new MiscInfo
            {
                Bower      = GetBowerVersions(),
                FSharp     = GetFSharpVersions(),
                Grunt      = GetGruntVersions(),
                Gulp       = GetGulpVersions(),
                TypeScript = GetTypeScriptVersions(),
                MySql      = GetMySqlVersions()
            };

            return(Ok(data));
        }
Esempio n. 4
0
    public void Use(MiscInfo itemInfo)
    {
        Debug.Log("Use item " + itemInfo.name + ", function: " + itemInfo.useFunction);
        switch (itemInfo.useFunction)
        {
        case MiscInfo.UseFunction.None:
            break;

        case MiscInfo.UseFunction.IdentifyItem:
            break;

        case MiscInfo.UseFunction.TownPortal:
            var pos      = Iso.MapToWorld(iso.pos);
            var teleport = World.SpawnObject("TP", pos, fit: true);
            teleport.modeName = "OP";
            var sound = SoundInfo.Find("player_townportal_cast");
            AudioManager.instance.Play(sound, pos);
            break;

        case MiscInfo.UseFunction.Potion:
            if (itemInfo.stat1 == "hpregen")
            {
                character.health += itemInfo.calc1;
            }
            if (itemInfo.stat1 == "manarecovery")
            {
                character.mana += itemInfo.calc1;
            }
            break;

        case MiscInfo.UseFunction.RejuvPotion:
            if (itemInfo.stat1 == "hitpoints")
            {
                character.health += (int)(itemInfo.calc1 / 100.0f * character.maxHealth);
            }
            if (itemInfo.stat1 == "mana")
            {
                character.mana += (int)(itemInfo.calc1 / 100.0f * character.maxMana);
            }
            if (itemInfo.stat2 == "hitpoints")
            {
                character.health += (int)(itemInfo.calc2 / 100.0f * character.maxHealth);
            }
            if (itemInfo.stat2 == "mana")
            {
                character.mana += (int)(itemInfo.calc2 / 100.0f * character.maxMana);
            }
            break;

        case MiscInfo.UseFunction.TemporaryPotion:
            break;

        case MiscInfo.UseFunction.HoradricCube:
            break;

        case MiscInfo.UseFunction.Elixir:
            break;

        case MiscInfo.UseFunction.StaminaPotion:
            break;
        }
    }