public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
 {
     int missionStep = MissionManager.Instance.GetMissionStepCounter(funcdata.ParamIntList[0]);
     OperationFunc.FuncOperatorValue((EFuncOperator)funcdata.Oper, ref missionStep, funcdata.ParamIntList[1]);
     MissionManager.Instance.SetMissionStepCounter(funcdata.ParamIntList[0], missionStep);
     return EFuncRet.Continue;
 }
Ejemplo n.º 2
0
    public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
    {
        try
        {
            int id = funcdata.ParamIntList[0];

            ThriftVector3 pos = new ThriftVector3();
            pos.X = funcdata.ParamIntList[1];
            pos.Y = funcdata.ParamIntList[2];
            pos.Z = funcdata.ParamIntList[3];

            ThriftVector3 rot = new ThriftVector3();
            rot.X = 0;
            rot.Y = funcdata.ParamIntList[4];
            rot.Z = 0;

            ThriftVector3 scal = new ThriftVector3();
            scal.X = funcdata.ParamIntList[5];
            scal.Y = funcdata.ParamIntList[5];
            scal.Z = funcdata.ParamIntList[5];

            TerrainManager.Instance.CreateNpcById(id, pos, rot, scal);
        }
        catch (Exception)
        {
            Debuger.LogWarning("error on create npc by function ");
        }
        return EFuncRet.Continue;
    }
    public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
    {
        try
        {
            ThriftVector3 pos = new ThriftVector3();
            pos.X = funcdata.ParamIntList[0];
            pos.Y = funcdata.ParamIntList[1];
            pos.Z = funcdata.ParamIntList[2];

            ThriftVector3 rot = new ThriftVector3();
            rot.X = 0;
            rot.Y = funcdata.ParamIntList[3];
            rot.Z = 0;

            ThriftVector3 scal = new ThriftVector3();
            scal.X = funcdata.ParamIntList[4];
            scal.Y = funcdata.ParamIntList[4];
            scal.Z = funcdata.ParamIntList[4];
            GameObject elem = EffectContainer.EffectFactory(funcdata.ParamStringList[0]);
            elem.transform.position = pos.GetVector3();
            elem.transform.eulerAngles = rot.GetVector3();
            elem.transform.localScale = scal.GetVector3();
        }
        catch
        {

        }
        
        return EFuncRet.Continue;
    }
Ejemplo n.º 4
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.I32)
                    {
                        Id = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.List)
                    {
                        {
                            FuncDataList = new List <FuncData>();
                            TList _list20 = iprot.ReadListBegin();
                            for (int _i21 = 0; _i21 < _list20.Count; ++_i21)
                            {
                                FuncData _elem22 = new FuncData();
                                _elem22 = new FuncData();
                                _elem22.Read(iprot);
                                FuncDataList.Add(_elem22);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
 public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
 {
     try
     {
        bool newValue = funcdata.ParamIntList[0] != 0;
        GestureManager.Instance.SetDictation(newValue);
     }
     catch (Exception)
     {
         Debuger.LogWarning("error on Change Dictate Game Status by function ");
     }
     return EFuncRet.Continue;
 }
 public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
 {
     try
     {
         int id = funcdata.ParamIntList[0];
         
         TerrainManager.Instance.DestroyNpcById(id);
     }
     catch (Exception)
     {
         Debuger.LogWarning("error on create npc by function ");
     }
     return EFuncRet.Continue;
 }
    public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
    {
        try
        {
            int id = funcdata.ParamIntList[0];

            MessageDispatcher.Instance.BroadcastMessage(new MessageObject(ClientCustomMessageDefine.C_CHANGE_TO_WORLD_GAME, id));
        }
        catch (Exception)
        {
            Debuger.LogWarning("error on Change To WorldGame by function ");
        }
        return EFuncRet.Continue;
    }
Ejemplo n.º 8
0
 public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
 {
     List<Ilife> target = Target.GetTarget((EFuncTarget) (funcdata.Target));
     for (int i = 0; i < target.Count; ++i)
     {
         Ilife elem = target[i];
         if (!(elem is PlayerCharacter))
         {
             continue;
         }
         bool newValue = funcdata.ParamIntList[1] != 0;
         PlayerManager.Instance.GetCharCounterData().SetFlag(funcdata.ParamIntList[0], newValue);
     }
     return EFuncRet.Continue;
 }
Ejemplo n.º 9
0
 public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
 {
     List<Ilife> target = Target.GetTarget((EFuncTarget)(funcdata.Target));
     for (int i = 0; i < target.Count; ++i)
     {
         Ilife elem = target[i];
         if (!(elem is PlayerCharacter))
         {
             continue;
         }
         int newValue = 0;
         OperationFunc.FuncOperatorValue((EFuncOperator)(funcdata.Oper), ref newValue, funcdata.ParamIntList[1]);
         PlayerManager.Instance.GetCharCounterData().SetBit32Count(funcdata.ParamIntList[0], newValue);
     }
     return EFuncRet.Continue;
 }
    public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
    {
        try
        {
            int id = funcdata.ParamIntList[0];

            if (id > 9 && id < 15)
            {
                PlayerManager.Instance.GetCharCounterData().SetFlag(id, true);
            }
            else
            {
                Debuger.LogWarning("error on unlock stage");
            }
        }
        catch (Exception)
        {
            Debuger.LogWarning("error on unlock stage ");
        }
        return EFuncRet.Continue;
    }
    public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
    {
        try
        {
            int id = funcdata.ParamIntList[0];

            MessageDispatcher.Instance.BroadcastMessage(new MessageObject(ClientCustomMessageDefine.C_CHANGE_TO_NODE_GAME, id));

            if(funcdata.ParamIntList.Count > 2)
            {
                WorldSceneDispatchController.Instance.SetExitFunId(funcdata.ParamIntList[1], funcdata.ParamIntList[2]);
            }
            else if(funcdata.ParamIntList.Count > 1)
            {
                WorldSceneDispatchController.Instance.SetExitFunId(funcdata.ParamIntList[1], 0);
            }
        }
        catch (Exception)
        {
            Debuger.LogWarning("error on Change To NodeGame by function ");
        }
        return EFuncRet.Continue;
    }
Ejemplo n.º 12
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.I32) {
           Id = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.List) {
           {
             FuncDataList = new List<FuncData>();
             TList _list20 = iprot.ReadListBegin();
             for( int _i21 = 0; _i21 < _list20.Count; ++_i21)
             {
               FuncData _elem22 = new FuncData();
               _elem22 = new FuncData();
               _elem22.Read(iprot);
               FuncDataList.Add(_elem22);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
 public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
 {
     AudioPlayer.Instance.PlayAudio(funcdata.ParamStringList[0], Vector3.zero,false);
     return EFuncRet.Continue;
 }
Ejemplo n.º 14
0
 public override EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata, FuncContext context)
 {
     MessageDispatcher.Instance.BroadcastMessage(new MessageObject(ClientCustomMessageDefine.C_PLAY_ACTION,funcdata.ParamIntList[0]));
     return EFuncRet.Continue;
 }
Ejemplo n.º 15
0
 public  abstract EFuncRet FuncExecHandler(HandleTarget Target, FuncData funcdata,FuncContext context);