Exemplo n.º 1
0
    public void AddPlayerBuff(int propsNo)
    {
        PropsLogicData      propsData     = LogicController.Instance.GetProps(propsNo);
        PropsBuffConfigData newBuffConfig = propsData.FunctionConfigData as PropsBuffConfigData;
        BuffData            buffData      = new BuffData();

        buffData.RelatedPropsType = propsData.PropsType;
        buffData.RemainingCD      = newBuffConfig.LastingSeconds;
        buffData.BuffConfigData   = newBuffConfig;

        foreach (KeyValuePair <BuffData, BuffLogicData> buff in this.m_Buffs)
        {
            if (newBuffConfig.BuffCategory == buff.Key.BuffConfigData.BuffCategory)
            {
                this.RemoveBuff(buff.Key);
                break;
            }
        }
        this.AddBuff(buffData);

        AddPlayerBuffRequestParameter request = new AddPlayerBuffRequestParameter();

        request.PropsNo     = propsNo;
        request.OperateTick = LogicTimer.Instance.GetServerTick();
        CommunicationUtility.Instance.AddPlayerBuff(request);
    }
Exemplo n.º 2
0
 public void AddPlayerBuff(AddPlayerBuffRequestParameter parameter)
 {
     this.CommunicateWithServer(parameter.GetHashtableFromParameter(), ClientCommandConsts.ADD_PLAYER_BUFF_COMMAND);
 }