Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | public class CB206_tagCMAddPoint : GameNetPackBasic {
|
| | | public byte PointAttrIDCount; // 加点属性ID个数
|
| | | public byte[] PointAttrIDList; // 加点属性ID列表
|
| | | public ushort[] PointValueList; // 加点属性ID对应的点数列表
|
| | | public uint[] PointValueList; // 加点属性ID对应的点数列表
|
| | |
|
| | | public CB206_tagCMAddPoint () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | |
| | | public override void WriteToBytes () {
|
| | | WriteBytes (PointAttrIDCount, NetDataType.BYTE);
|
| | | WriteBytes (PointAttrIDList, NetDataType.BYTE, PointAttrIDCount);
|
| | | WriteBytes (PointValueList, NetDataType.WORD, PointAttrIDCount);
|
| | | WriteBytes (PointValueList, NetDataType.DWORD, PointAttrIDCount);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsQualityProperty", _m_IsQualityProperty); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsPreReikiRoot", _m_IsPreReikiRoot); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReceivePackage", _m_ReceivePackage); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "SendAddPoint", _m_SendAddPoint); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshReikiRootPoint", _m_RefreshReikiRootPoint); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "onCacheFreePointRefresh", _e_onCacheFreePointRefresh); |
| | |
| | | HB107_tagMCRolePointInfo _package = (HB107_tagMCRolePointInfo)translator.GetObject(L, 2, typeof(HB107_tagMCRolePointInfo)); |
| | | |
| | | gen_to_be_invoked.ReceivePackage( _package ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SendAddPoint(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.ReikiRootModel gen_to_be_invoked = (Snxxz.UI.ReikiRootModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | byte[] _points = LuaAPI.lua_tobytes(L, 2); |
| | | ushort[] _pointValues = (ushort[])translator.GetObject(L, 3, typeof(ushort[])); |
| | | |
| | | gen_to_be_invoked.SendAddPoint( _points, _pointValues ); |
| | | |
| | | |
| | | |
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void SendAddPoint(byte[] points, ushort[] pointValues)
|
| | | public void SendAddPoint(byte[] points, uint[] pointValues)
|
| | | {
|
| | | var pak = new CB206_tagCMAddPoint();
|
| | | pak.PointAttrIDList = points;
|
| | |
| | | }
|
| | |
|
| | | var ids = new byte[length];
|
| | | var values = new ushort[length];
|
| | | var values = new uint[length];
|
| | | var index = 0;
|
| | | for (int i = 0; i < m_ReikiRootPoints.Count; i++)
|
| | | {
|
| | | if (m_ReikiRootPoints[i].point > 0)
|
| | | {
|
| | | ids[index] = (byte)m_ReikiRootPoints[i].id;
|
| | | values[index] = (ushort)m_ReikiRootPoints[i].point;
|
| | | values[index] = (uint)m_ReikiRootPoints[i].point;
|
| | | index++;
|
| | | }
|
| | | }
|