void ZPostUserOption() { unsigned long nOptionFlags = 0; if (Z_ETC_REJECT_WHISPER) nOptionFlags |= MBITFLAG_USEROPTION_REJECT_WHISPER; if (Z_ETC_REJECT_INVITE) nOptionFlags |= MBITFLAG_USEROPTION_REJECT_INVITE; ZPOSTCMD1(MC_MATCH_USER_OPTION, MCmdParamUInt(nOptionFlags)); }
void ZActor::PostBasicInfo() { DWORD nNowTime = GetGlobalTimeMS(); if (GetInitialized() == false) return; if(IsDie() && ZGetGame()->GetTime() - GetDeadTime()>5.f) return; int nMoveTick = (ZGetGameClient()->GetAllowTunneling() == false) ? PEERMOVE_TICK : PEERMOVE_AGENT_TICK; if ((int)(nNowTime - m_nLastTime[ACTOR_LASTTIME_BASICINFO]) >= nMoveTick) { m_nLastTime[ACTOR_LASTTIME_BASICINFO] = nNowTime; ZACTOR_BASICINFO pbi; pbi.fTime = ZGetGame()->GetTime(); pbi.uidNPC = GetUID(); pbi.posx = m_Position.x; pbi.posy = m_Position.y; pbi.posz = m_Position.z; pbi.velx = GetVelocity().x; pbi.vely = GetVelocity().y; pbi.velz = GetVelocity().z; pbi.dirx = GetDirection().x*32000.0f; pbi.diry = GetDirection().y*32000.0f; pbi.dirz = GetDirection().z*32000.0f; pbi.anistate = GetCurrAni(); ZPOSTCMD1(MC_QUEST_PEER_NPC_BASICINFO, MCommandParameterBlob(&pbi,sizeof(ZACTOR_BASICINFO))); ZBasicInfoItem Item; Item.info.position = m_Position; Item.info.direction = GetDirection(); Item.info.velocity = GetVelocity(); Item.fSendTime = Item.fReceivedTime = ZGetGame()->GetTime(); AddToHistory(Item); } }
void ZActor::Attack_Melee() { m_Animation.Input(ZA_INPUT_ATTACK_MELEE); ZPOSTCMD1(MC_QUEST_PEER_NPC_ATTACK_MELEE, MCommandParameterUID(GetUID())); }