| | |
| | | static boolReturnedValueDelegate isLuaDungeonDefeatWin; |
| | | |
| | | static boolReturnedValueDelegate isLuaDailyQuest; |
| | | static boolReturnedValueDelegate gotoLuaDailyQuest; |
| | | |
| | | public static void Init() |
| | | { |
| | |
| | | |
| | | LuaUtility.DoString("interface.DailyQuestInterface"); |
| | | isLuaDailyQuest = LuaUtility.Global.Get<boolReturnedValueDelegate>("IsLuaDailyQuest"); |
| | | gotoLuaDailyQuest = LuaUtility.Global.Get<boolReturnedValueDelegate>("GotoDailyQuest"); |
| | | |
| | | LuaUtility.DoString("config.ConfigInit"); |
| | | configInit = LuaUtility.Global.Get<GeneralDelegate>("ConfigInit"); |
| | |
| | | } |
| | | } |
| | | |
| | | static object lockojb1 = new object(); |
| | | public static void OnRecieveLuaNetPackage(ushort cmd, byte[] bytes) |
| | | { |
| | | if (onRecieveLuaNetPackage != null) |
| | | lock (lockojb1) |
| | | { |
| | | onRecieveLuaNetPackage(cmd, bytes); |
| | | if (onRecieveLuaNetPackage != null) |
| | | { |
| | | onRecieveLuaNetPackage(cmd, bytes); |
| | | } |
| | | } |
| | | } |
| | | |
| | | static object lockojb2 = new object(); |
| | | public static void OnRecieveCSharpNetPackage(ushort cmd) |
| | | { |
| | | if (onCSharpNetPackage != null) |
| | | lock (lockojb2) |
| | | { |
| | | onCSharpNetPackage(cmd); |
| | | if (onCSharpNetPackage != null) |
| | | { |
| | | onCSharpNetPackage(cmd); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | public static void GotoLuaDailyQuest(int dailyquest) |
| | | { |
| | | if (gotoLuaDailyQuest != null) |
| | | { |
| | | gotoLuaDailyQuest(dailyquest); |
| | | } |
| | | } |
| | | |
| | | } |