Beispiel #1
0
 public static int GetBuffIDFromBuffActionID(int actionID)
 {
     if (!AvatarAction.IsBuffActionID(actionID))
     {
         return(0);
     }
     return(0x5000000 | (actionID & 0xffff));
 }
Beispiel #2
0
 public static int ComposeBuffActionID(int actionID, int buffID)
 {
     if (!AvatarAction.IsBuffActionID(actionID))
     {
         return(0);
     }
     return((actionID & -65536) | (buffID & 0xffff));
 }
Beispiel #3
0
 public static int GetActionIDFromBuffActionID(int actionID)
 {
     if (!AvatarAction.IsBuffActionID(actionID))
     {
         return(0);
     }
     return(actionID & ((int)0x07fff0000L));
 }
Beispiel #4
0
        public AvatarAction GetActionById(int id)
        {
            AvatarAction action;

            if (AvatarAction.IsBuffActionID(id))
            {
                ClientServerCommon.Buff buffById = this.GetBuffById(ClientServerCommon.Buff.GetBuffIDFromBuffActionID(id));
                if (buffById == null)
                {
                    return(null);
                }
                return(buffById.GetActionById(ClientServerCommon.Buff.GetActionIDFromBuffActionID(id)));
            }
            if (!this._id_actionMap.TryGetValue(id, out action))
            {
                return(null);
            }
            return(action);
        }