Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        if (actor != null)
        {
            foreach (DictionaryEntry e in actor.Property)
            {
                sdConfDataMgr.SetMemberValue(this, e.Key as string, e.Value);
            }
        }

        {
            List <sdBuff> lstBuff = actor.GetBuffs();
            if (lstBuff.Count > 0)
            {
                Hashtable table = (Hashtable)sdConfDataMgr.Instance().GetTable("buff");
                if (buff == null)
                {
                    buff = new string[lstBuff.Count];
                }
                if (buff.Length != lstBuff.Count)
                {
                    buff = new string[lstBuff.Count];
                }
                for (int i = 0; i < lstBuff.Count; i++)
                {
                    sdBuff    sbuff = lstBuff[i];
                    int       id    = sbuff.GetTemplateID();
                    Hashtable prop  = table[id.ToString()] as Hashtable;

                    buff[i] = id.ToString() + "_" +
                              prop["szName[ROLE_NAME_LEN]"] as string + "_" +
                              prop["szDescription[DESCRIPTION_LEN]"] as string;
                }
            }
            else
            {
                buff = null;
            }
        }

        STAY        = actor.CheckDebuffState(HeaderProto.ECreatureActionState.CREATURE_ACTION_STATE_STAY);
        HOLD        = actor.CheckDebuffState(HeaderProto.ECreatureActionState.CREATURE_ACTION_STATE_HOLD);
        STUN        = actor.CheckDebuffState(HeaderProto.ECreatureActionState.CREATURE_ACTION_STATE_STUN);
        LIMIT_SKILL = actor.CheckDebuffState(HeaderProto.ECreatureActionState.CREATURE_ACTION_STATE_LIMIT_SKILL);
        UNBEAT      = actor.CheckDebuffState(HeaderProto.ECreatureActionState.CREATURE_ACTION_STATE_UNBEAT);
        KNOCKBACK   = actor.CheckDebuffState(HeaderProto.ECreatureActionState.CREATURE_ACTION_STATE_KNOCKBACK);
    }