SendCharStatus() public method

Send all the status to the client. Send: Job, EXP, HP/SP, LC/LP and basic info on all other party members
public SendCharStatus ( ushort visiblefield ) : void
visiblefield ushort 0 for none, 4 for jexp, 32 for cexp, 36 for both
return void
Ejemplo n.º 1
0
        public void ProcessLevel( MapClient client, string args )
        {
            string[] inputs = args.Split(' ');
            uint cdifference;
            uint jdifference;
            args = args.ToLower();
            uint level = 1;

            if( inputs.Length >= 2 )
            {
                uint secondVal;
                if( uint.TryParse( inputs[1], out secondVal ) )
                    level = secondVal;
            }

            switch (inputs[0])
            {
                case "c":
                case "char":
                    cdifference = ExperienceManager.Instance.GetExpForLevel((client.Char.cLevel + level - 1), ExperienceManager.LevelType.CLEVEL) - client.Char.cExp;
                    client.Char.cExp = client.Char.cExp + cdifference + 1;
                    ExperienceManager.Instance.CheckExp(client, ExperienceManager.LevelType.CLEVEL);
                    break;
                case "j":
                case "job":
                    jdifference = ExperienceManager.Instance.GetExpForLevel((client.Char.jLevel + level - 1), ExperienceManager.LevelType.JLEVEL) - client.Char.jExp;
                    client.Char.jExp = client.Char.jExp + jdifference + 1;
                    ExperienceManager.Instance.CheckExp(client, ExperienceManager.LevelType.JLEVEL);
                    break;
                case "reset":
                    client.Char.cExp = 1;
                    client.Char.jExp = 1;
                    client.Char.cLevel = 1;
                    client.Char.jLevel = 1;
                    client.SendCharStatus(36);
                    break;
                default:
                    cdifference = ExperienceManager.Instance.GetExpForLevel((client.Char.cLevel), ExperienceManager.LevelType.CLEVEL) - client.Char.cExp;
                    jdifference = ExperienceManager.Instance.GetExpForLevel((client.Char.jLevel), ExperienceManager.LevelType.JLEVEL) - client.Char.jExp;
                    client.Char.cExp = client.Char.cExp + cdifference + 1;
                    client.Char.jExp = client.Char.jExp + jdifference + 1;
                    ExperienceManager.Instance.CheckExp(client, ExperienceManager.LevelType.CLEVEL);
                    ExperienceManager.Instance.CheckExp(client, ExperienceManager.LevelType.JLEVEL);
                    break;
            }
        }
Ejemplo n.º 2
0
        public void ProcessRes(MapClient client, string args)
        {
            if (client.Char.stance == Global.STANCE.DIE)
            {
                client.Char.HP = client.Char.maxHP;
                client.Char.stance = Global.STANCE.REBORN;
                client.Char.state = 0;
                client.SendBattleStatus();
                client.SendCharStatus(0);

                Packets.Server.ActorChangeState p1 = new SagaMap.Packets.Server.ActorChangeState();
                p1.SetActorID(client.Char.id);
                p1.SetBattleState(false);
                p1.SetStance(Global.STANCE.REBORN);
                client.netIO.SendPacket(p1, client.SessionID);

                SagaMap.Map.SkillArgs arg = new Map.SkillArgs();
                client.map.SendEventToAllActorsWhoCanSeeActor(Map.EVENT_TYPE.CHANGE_STATE, arg, client.Char, false);
                client.map.TeleportActor(client.Char, client.Char.x, client.Char.y, client.Char.z);
            }
            else
            {
                client.SendMessage(_MasterName, "You aren't dead >:[");
            }
        }
Ejemplo n.º 3
0
 public void ProcessHeal(MapClient client, string args)
 {
     client.Char.HP = client.Char.maxHP;
     client.Char.SP = client.Char.maxSP;
     client.SendCharStatus(0);
 }