Esempio n. 1
0
 public bool isFreeze()
 {
     if (this.m_cardTableItem.m_type == (int)CardType.CARDTYPE_ATTEND || this.m_cardTableItem.m_type == (int)CardType.CARDTYPE_HERO)
     {
         if (UtilMath.checkState(StateID.CARD_STATE_FREEZE, m_svrCard.state))
         {
             return(true);
         }
     }
     return(false);
 }
Esempio n. 2
0
 public bool hasShield()
 {
     if (this.m_cardTableItem.m_type == (int)CardType.CARDTYPE_ATTEND)
     {
         if (UtilMath.checkState(StateID.CARD_STATE_SHIED, m_svrCard.state))
         {
             return(true);
         }
     }
     return(false);
 }
Esempio n. 3
0
 public bool isCharge()
 {
     if (this.m_cardTableItem.m_type == (int)CardType.CARDTYPE_ATTEND)
     {
         if (UtilMath.checkState(StateID.CARD_STATE_CHARGE, m_svrCard.state))
         {
             return(true);
         }
     }
     return(false);
 }
Esempio n. 4
0
        public bool bStateChange()
        {
            int idx = 0;

            for (idx = 0; idx < (int)StateID.CARD_STATE_MAX; ++idx)
            {
                if (UtilMath.checkState((StateID)idx, m_changedState))
                {
                    return(true);
                }
            }

            return(false);
        }
Esempio n. 5
0
        public void updateStateChange(byte[] srcStateArr, byte[] destStateArr)
        {
            int  idx       = 0;
            bool srcState  = false;
            bool destState = false;

            for (idx = 0; idx < (int)StateID.CARD_STATE_MAX; ++idx)
            {
                srcState  = UtilMath.checkState((StateID)idx, srcStateArr);
                destState = UtilMath.checkState((StateID)idx, destStateArr);

                if (srcState != destState)
                {
                    UtilMath.setState((StateID)idx, m_changedState);     // 设置状态变化标志
                }
                if (destState)
                {
                    UtilMath.setState((StateID)idx, m_curState);
                }
            }
        }
Esempio n. 6
0
 public bool bInSleepState()
 {
     return(UtilMath.checkState(StateID.CARD_STATE_SLEEP, m_svrCard.state));
 }