GAME_MSG_PLAYER_ENTER_VIEW = 9002,
GAME_PLAYER_LOCATION_NOTIFY = 9003,
GAME_MSG_PLAYER_MOVE = 1005,
_snprintf(buf, sizeof(buf)-1, "%d", DbRet["GUID"]->GetLongLong() );
场景ID:1001 未加载!
地图资源没有加载, 玩家430000120|地图1001
SetSceneId
修改某个值
update player_table set x = 40
http:
for(Tint32 index = 0; index < attrLen; ++index)
{
CommMsg::ItemInfo_Attr* attr = item.add_extraattrlist();
attr->set_key(bagCell.m_DynamicExtraAttr[index].Key);
Tint32 nValue = bagCell.m_DynamicExtraAttr[index].Value;
attr->set_value(nValue);
}
Extralib::Timer::DateTime::GetCurSec()
void GamePlayer::SendEnterViewInfo( GamePlayer* pPlayer )
http://192.168.0.26/cq9/
void CSceneCell::SendCellEnterMsg( IRole* pPlayer, bool bIncludeNear )
bool Room::HandleOnMove( IRole * pRole )
void SyncCoord( );
std::set<IRole*> m_HandleMoveList;
bool Room::OnMove( IRole * pRole )
MonsterChangePosPlayData
((GamePlayer*)pRole)->GetGUID();
后进的没有先进的附近玩家
进场景获得附近玩家列表
vector<GamePlayer*> NearPlayers = GetNearPlayerList();
IntVector IRole::GetNearPlayersLua()
{
IntVector roleidlist;
CSceneCell* pSceneCell = GetSceneCell();
if( !pSceneCell )
return roleidlist;
vector<GamePlayer*> vNear = pSceneCell->GetNearPlayerList();
for(vector<GamePlayer*>::iterator itr=vNear.begin();itr!=vNear.end();itr++)
{
GamePlayer* pGamePlayer = *itr;
roleidlist.Add(pGamePlayer->GetRoleId());
}
return roleidlist;
}
vector<GamePlayer*> GetNearPlayers();
void GamePlayer::SendEnterViewInfo( GamePlayer* pPlayer )
GAME_MSG_PLAYER_LEAVE_VIEW = 143,
struct MsgRoleLeaveMapRes
{
t_RoleID roleId_m;
};
共享内存 - 读写锁
GAME_MSG_MONSTER_ENTER_VIEW = 141,
struct MsgEnterViewMonsterInfo
GAME_MSG_MONSTER_LOCATION_RES = 147,
移动-》添加进移动列表
for 移动列表
{
for 附近玩家列表
{
告诉他我移动了
}
}
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步