mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-10 09:28:06 +00:00
fix: Remove instances of undefined behavior
This commit is contained in:
@@ -258,8 +258,8 @@ void DestroyableComponent::SetMaxHealth(float value, bool playAnim) {
|
||||
if (!characterComponent) return;
|
||||
|
||||
AMFArrayValue args;
|
||||
args.Insert("amount", std::to_string(difference));
|
||||
args.Insert("type", "health");
|
||||
args.Insert<std::string>("amount", std::to_string(difference));
|
||||
args.Insert<std::string>("type", "health");
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(m_Parent, characterComponent->GetSystemAddress(), "MaxPlayerBarUpdate", args);
|
||||
}
|
||||
@@ -300,8 +300,8 @@ void DestroyableComponent::SetMaxArmor(float value, bool playAnim) {
|
||||
if (!characterComponent) return;
|
||||
|
||||
AMFArrayValue args;
|
||||
args.Insert("amount", std::to_string(value));
|
||||
args.Insert("type", "armor");
|
||||
args.Insert<std::string>("amount", std::to_string(value));
|
||||
args.Insert<std::string>("type", "armor");
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(m_Parent, characterComponent->GetSystemAddress(), "MaxPlayerBarUpdate", args);
|
||||
}
|
||||
@@ -341,8 +341,8 @@ void DestroyableComponent::SetMaxImagination(float value, bool playAnim) {
|
||||
if (!characterComponent) return;
|
||||
|
||||
AMFArrayValue args;
|
||||
args.Insert("amount", std::to_string(difference));
|
||||
args.Insert("type", "imagination");
|
||||
args.Insert<std::string>("amount", std::to_string(difference));
|
||||
args.Insert<std::string>("type", "imagination");
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(m_Parent, characterComponent->GetSystemAddress(), "MaxPlayerBarUpdate", args);
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ void PropertyEntranceComponent::OnUse(Entity* entity) {
|
||||
|
||||
AMFArrayValue args;
|
||||
|
||||
args.Insert("state", "property_menu");
|
||||
args.Insert<std::string>("state", "property_menu");
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(entity, entity->GetSystemAddress(), "pushGameState", args);
|
||||
}
|
||||
|
@@ -98,7 +98,7 @@ namespace GMZeroCommands {
|
||||
{
|
||||
AMFArrayValue args;
|
||||
|
||||
args.Insert("state", "Story");
|
||||
args.Insert<std::string>("state", "Story");
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(entity, entity->GetSystemAddress(), "pushGameState", args);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ namespace GMZeroCommands {
|
||||
{
|
||||
AMFArrayValue args;
|
||||
|
||||
args.Insert("state", "Story");
|
||||
args.Insert<std::string>("state", "Story");
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(entity, entity->GetSystemAddress(), "pushGameState", args);
|
||||
}
|
||||
|
Reference in New Issue
Block a user