MapServer.PlayerObject.SetCurrentNpcInfo C# (CSharp) Method

SetCurrentNpcInfo() public method

public SetCurrentNpcInfo ( GameStruct info ) : void
info GameStruct
return void
        public void SetCurrentNpcInfo(GameStruct.NPCInfo info)
        {
            mNpcInfo = info;
        }

Usage Example

示例#1
0
        public void ExecuteActionForNpc(uint npcid, PlayerObject play)
        {
            GameStruct.NPCInfo info = ConfigManager.Instance().GetNpcInfoToID(npcid);
            play.SetCurrentNpcInfo(info);

            if (info == null)
            {
                Log.Instance().WriteLog("执行脚本失败.npcid脚本未找到:" + npcid.ToString());
                return;
            }

            ExecuteAction(info.ScriptID, play);
        }