Changeset 325 for binary-improvements/7dtd-server-fixes/src/API.cs
- Timestamp:
- Sep 4, 2018, 1:00:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/API.cs
r324 r325 1 using System;2 1 using System.Collections.Generic; 3 2 4 namespace AllocsFixes 5 { 3 namespace AllocsFixes { 6 4 public class API : IModApi { 5 public void InitMod () { 6 ModEvents.GameAwake.RegisterHandler (GameAwake); 7 ModEvents.GameShutdown.RegisterHandler (GameShutdown); 8 ModEvents.SavePlayerData.RegisterHandler (SavePlayerData); 9 ModEvents.PlayerSpawning.RegisterHandler (PlayerSpawning); 10 ModEvents.PlayerDisconnected.RegisterHandler (PlayerDisconnected); 11 ModEvents.ChatMessage.RegisterHandler (ChatMessage); 12 } 7 13 8 14 public void GameAwake () { … … 13 19 StateManager.Shutdown (); 14 20 } 15 21 16 22 public void SavePlayerData (ClientInfo _cInfo, PlayerDataFile _playerDataFile) { 17 23 PlayerDataStuff.GM_SavePlayerData (_cInfo, _playerDataFile); … … 21 27 AllocsLogFunctions.RequestToSpawnPlayer (_cInfo, _chunkViewDim, _playerProfile); 22 28 } 23 29 24 30 public void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) { 25 31 AllocsLogFunctions.PlayerDisconnected (_cInfo, _bShutdown); 26 32 } 27 33 28 public bool ChatMessage (ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName, bool _localizeMain, List<int> _recipientEntityIds) { 34 public bool ChatMessage (ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName, 35 bool _localizeMain, List<int> _recipientEntityIds) { 29 36 return ChatHookExample.Hook (_cInfo, _type, _msg, _mainName); 30 }31 32 public void InitMod () {33 ModEvents.GameAwake.RegisterHandler (GameAwake);34 ModEvents.GameShutdown.RegisterHandler (GameShutdown);35 ModEvents.SavePlayerData.RegisterHandler (SavePlayerData);36 ModEvents.PlayerSpawning.RegisterHandler (PlayerSpawning);37 ModEvents.PlayerDisconnected.RegisterHandler (PlayerDisconnected);38 ModEvents.ChatMessage.RegisterHandler (ChatMessage);39 37 } 40 38 } 41 39 } 42
Note:
See TracChangeset
for help on using the changeset viewer.