Add some data returns to NPC.Position and GetInitial

This commit is contained in:
Akkadius 2015-02-03 00:31:55 -06:00
parent 3448dd1a9e
commit 6064ca95f9
3 changed files with 5 additions and 0 deletions

View File

@ -623,6 +623,8 @@ void EntityList::AddNPC(NPC *npc, bool SendSpawnPacket, bool dontqueue)
params.push_back(std::to_string((double)npc->GetHeading()));
params.push_back(std::to_string((double)npc->GetClass()));
params.push_back(std::to_string((double)npc->GetRace()));
params.push_back(std::to_string((double)npc->GetWalkspeed()));
params.push_back(std::to_string((double)npc->GetRunspeed()));
RemoteCallSubscriptionHandler::Instance()->OnEvent("NPC.Position", params);
}

View File

@ -1239,6 +1239,8 @@ void Mob::MakeSpawnUpdateNoDelta(PlayerPositionUpdateServer_Struct *spu){
params.push_back(std::to_string((double)m_Position.w));
params.push_back(std::to_string((double)GetClass()));
params.push_back(std::to_string((double)GetRace()));
params.push_back(std::to_string((double)GetWalkspeed()));
params.push_back(std::to_string((double)GetRunspeed()));
RemoteCallSubscriptionHandler::Instance()->OnEvent("NPC.Position", params);
}
}

View File

@ -144,6 +144,7 @@ void handle_rc_get_initial_entity_positions(const std::string &method, const std
res["z"] = std::to_string((double)npc->GetZ());
res["h"] = std::to_string((double)npc->GetHeading());
res["aggro_range"] = std::to_string((double)npc->GetAggroRange());
res["gender"] = std::to_string((double)npc->GetGender());
RemoteCallResponse(connection_id, request_id, res, error);
}
std::list<Client*> client_list;