mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +00:00
General AMF cleanup (#663)
* General AMF cleanup Proper memory management as well as style cleanup * General optimizations Fix AMFArray so values are properly deleted when you leave the scope it was created in. Add bounds check for deletion so you don't double delete. Remove all AMFdeletions that are contained in an array since the array now manages its own memory and deletes it when it is no longer needed. * Better tests and fix de-serialize Fix de-serialize to be correct and implement a test to check this * Update AMFDeserializeTests.cpp * Update AMFFormat.cpp
This commit is contained in:
@@ -4978,12 +4978,9 @@ void GameMessages::HandleFireEventServerSide(RakNet::BitStream* inStream, Entity
|
||||
}
|
||||
|
||||
if (args == u"toggleMail") {
|
||||
AMFFalseValue* value = new AMFFalseValue();
|
||||
|
||||
AMFArrayValue args;
|
||||
args.InsertValue("visible", value);
|
||||
args.InsertValue("visible", new AMFFalseValue());
|
||||
GameMessages::SendUIMessageServerToSingleClient(entity, sysAddr, "ToggleMail", &args);
|
||||
delete value;
|
||||
}
|
||||
|
||||
// This should probably get it's own "ServerEvents" system or something at some point
|
||||
|
Reference in New Issue
Block a user