本文整理汇总了C#中IService.ply_change_map方法的典型用法代码示例。如果您正苦于以下问题:C# IService.ply_change_map方法的具体用法?C# IService.ply_change_map怎么用?C# IService.ply_change_map使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IService
的用法示例。
在下文中一共展示了IService.ply_change_map方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: add_player_to_map
public void add_player_to_map(IService game_ref, int clientid, IBaseUnit sgplayer)
{
// 中断打坐
//sgplayer.try_stop_recover();
long cur_tm_s = DateTime.Now.ToBinary();
var players_info = game_ref.sgplayers;
sgplayer.gmap = this;
IMapUnit pl = sgplayer.get_pack_data();
pl.iid = this.add_player(clientid, pl.x, pl.y, sgplayer);
this.map_sprites[pl.iid] = sgplayer;
this.map_players[pl.iid] = sgplayer;
this.map_players_bysid[clientid] = sgplayer;
this.map_players_bycid[pl.cid] = sgplayer;
if (this.blvlmap)
{ //玩家在副本切换地图通知
game_ref.ply_change_map(sgplayer, this);
}
// send map change msg
//var map_change_data = {mpid=pl.map_id, iid=pl.iid, x=pl.x, y=pl.y,
// speed=pl.speed, maxhp=pl.max_hp, maxmp=pl.max_mp,in_pczone=pl.in_pczone};
//sys.dumpobj(dpitms);
if (this.map_dpitms.Count > 0)
{
List<int> removed_items = new List<int>();
foreach (var drop_item in map_dpitms)
{
drop_item.Value.left_tm = drop_item.Value.dis_tm - cur_tm_s;
if (drop_item.Value.left_tm <= 0)
removed_items.Add(drop_item.Key);
}
foreach (int k in removed_items)
this.map_dpitms.Remove(k);
//map_change_data.dpitms < -this.map_dpitms;
}
//::send_rpc(clientid, 58, map_change_data);
//// 尝试召唤战斗宠物
//if (pl.pet_mon.mid > 0)
//{
// if (pl.pet_mon.fintm > cur_tm_s)
// {
// sgplayer.call_petmon(pl.pet_mon.mid, pl.pet_mon.fintm);
// }
// else
// {
// pl.pet_mon.mid = 0;
// pl.pet_mon.fintm = 0;
// }
//}
}