Changed a bunch of function names to be shorter but still descriptive

This commit is contained in:
KimLS
2014-08-02 14:31:39 -07:00
parent ae30d8b257
commit 379ecc655c
7 changed files with 22 additions and 24 deletions
+1 -1
View File
@@ -1225,7 +1225,7 @@ void Mob::MakeSpawnUpdateNoDelta(PlayerPositionUpdateServer_Struct *spu){
params.push_back(std::to_string((double)y_pos));
params.push_back(std::to_string((double)z_pos));
params.push_back(std::to_string((double)heading));
RemoteCallSubscriptionHandler::Instance()->OnEvent("NPC::MakeSpawnUpdateNoDelta", params);
RemoteCallSubscriptionHandler::Instance()->OnEvent("NPCPosition", params);
}
}
+3 -4
View File
@@ -406,10 +406,6 @@ int main(int argc, char** argv) {
worldwasconnected = false;
}
if(RemoteCallProcessTimer.Check()) {
RemoteCallSubscriptionHandler::Instance()->Process();
}
if (ZoneLoaded && zoneupdate_timer.Check()) {
{
if(net.group_timer.Enabled() && net.group_timer.Check())
@@ -445,6 +441,9 @@ int main(int argc, char** argv) {
if(quest_timers.Check())
quest_manager.Process();
if(RemoteCallProcessTimer.Check()) {
RemoteCallSubscriptionHandler::Instance()->Process();
}
}
}
DBAsyncWork* dbaw = 0;
+2 -2
View File
@@ -68,8 +68,8 @@ void RemoteCall(const std::string &connection_id, const std::string &method, con
}
void register_remote_call_handlers() {
remote_call_methods["Zone::Subscribe"] = handle_rc_subscribe;
remote_call_methods["Zone::Unsubscribe"] = handle_rc_unsubscribe;
remote_call_methods["Zone.Subscribe"] = handle_rc_subscribe;
remote_call_methods["Zone.Unsubscribe"] = handle_rc_unsubscribe;
}
void handle_rc_subscribe(const std::string &method, const std::string &connection_id, const std::string &request_id, const std::vector<std::string> &params) {
+1 -2
View File
@@ -96,7 +96,7 @@ void RemoteCallSubscriptionHandler::OnEvent(std::string method, std::vector<std:
return;
}
std::string func = "WebInterface::DispatchEvent::" + method;
std::string func = "On." + method;
std::vector<std::string> &conns = registered_events[method];
if(conns.size() > 0) {
auto &iter = conns.begin();
@@ -158,5 +158,4 @@ void RemoteCallSubscriptionHandler::ClearConnection(std::string connection_id) {
void RemoteCallSubscriptionHandler::ClearAllConnections() {
registered_events.clear();
connection_ids.clear();
}