mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 12:18:27 +00:00
Changed a bunch of function names to be shorter but still descriptive
This commit is contained in:
@@ -8,16 +8,16 @@ extern std::map<std::string, MethodHandler> unauthorized_methods;
|
||||
|
||||
void register_authorized_methods()
|
||||
{
|
||||
authorized_methods["WebInterface::Authorize"] = std::make_pair(0, handle_method_token_auth);
|
||||
authorized_methods["World::ListZones"] = std::make_pair(10, handle_method_no_args);
|
||||
authorized_methods["World::GetZoneDetails"] = std::make_pair(10, handle_method_get_zone_info);
|
||||
authorized_methods["Zone::Subscribe"] = std::make_pair(10, handle_method_subscribe);
|
||||
authorized_methods["Zone::Unsubscribe"] = std::make_pair(10, handle_method_subscribe);
|
||||
authorized_methods["WebInterface.Authorize"] = std::make_pair(0, handle_method_token_auth);
|
||||
authorized_methods["World.ListZones"] = std::make_pair(10, handle_method_no_args);
|
||||
authorized_methods["World.GetZoneDetails"] = std::make_pair(10, handle_method_get_zone_info);
|
||||
authorized_methods["Zone.Subscribe"] = std::make_pair(10, handle_method_subscribe);
|
||||
authorized_methods["Zone.Unsubscribe"] = std::make_pair(10, handle_method_subscribe);
|
||||
}
|
||||
|
||||
void register_unauthorized_methods()
|
||||
{
|
||||
unauthorized_methods["WebInterface::Authorize"] = handle_method_token_auth;
|
||||
unauthorized_methods["WebInterface.Authorize"] = handle_method_token_auth;
|
||||
}
|
||||
|
||||
void register_methods()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
socket.onopen = function(e) {
|
||||
var obj = {};
|
||||
obj.id = 'token_auth_id';
|
||||
obj.method = 'WebInterface::Authorize';
|
||||
obj.method = 'WebInterface.Authorize';
|
||||
obj.params = ['c5b80ec8-4174-4c4c-d332-dbf3c3a551fc'];
|
||||
socket.send(JSON.stringify(obj));
|
||||
};
|
||||
@@ -32,18 +32,18 @@
|
||||
console.log(obj);
|
||||
|
||||
if(obj.id == 'token_auth_id') {
|
||||
socket.send(JSON.stringify({id: 'list_zones_id', method: 'World::ListZones', params: []}));
|
||||
socket.send(JSON.stringify({id: 'list_zones_id', method: 'World.ListZones', params: []}));
|
||||
} else if(obj.id == 'list_zones_id') {
|
||||
for (var key in obj.result) {
|
||||
if(obj.result.hasOwnProperty(key)) {
|
||||
var str = JSON.stringify({id: 'get_zone_info_id', method: 'World::GetZoneDetails', params: [obj.result[key]]});
|
||||
console.log(str);
|
||||
var str = JSON.stringify({id: 'get_zone_info_id', method: 'World.GetZoneDetails', params: [obj.result[key]]});
|
||||
socket.send(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(obj.id == 'get_zone_info_id') {
|
||||
socket.send(JSON.stringify({id: 'subscribe_id', method: 'Zone::Subscribe', params: [obj.result["zone_id"], obj.result["instance_id"], 'NPC::MakeSpawnUpdateNoDelta']}));
|
||||
socket.send(JSON.stringify({id: 'subscribe_id', method: 'Zone.Subscribe', params: [obj.result["zone_id"], obj.result["instance_id"], 'NPCPosition']}));
|
||||
} else if(obj.method = "On.NPCPosition") {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user