mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-26 23:43:34 +00:00
Added GM for reputation update
This commit is contained in:
parent
94e0ef77a9
commit
fdd3e15b2f
@ -595,7 +595,9 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream* inStream, const System
|
||||
case GAME_MSG_VEHICLE_NOTIFY_HIT_IMAGINATION_SERVER:
|
||||
GameMessages::HandleVehicleNotifyHitImaginationServer(inStream, entity, sysAddr);
|
||||
break;
|
||||
|
||||
case GAME_MSG_UPDATE_PROPERTY_PERFORMANCE_COST:
|
||||
GameMessages::HandleUpdatePropertyPerformanceCost(inStream, entity, sysAddr);
|
||||
break;
|
||||
// SG
|
||||
case GAME_MSG_UPDATE_SHOOTING_GALLERY_ROTATION:
|
||||
GameMessages::HandleUpdateShootingGalleryRotation(inStream, entity, sysAddr);
|
||||
|
@ -4137,6 +4137,31 @@ void GameMessages::HandleRacingPlayerInfoResetFinished(RakNet::BitStream* inStre
|
||||
}
|
||||
}
|
||||
|
||||
void GameMessages::HandleUpdatePropertyPerformanceCost(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr) {
|
||||
float performanceCost = 0.0f;
|
||||
|
||||
if (inStream->ReadBit()) inStream->Read(performanceCost);
|
||||
|
||||
Game::logger->Log("GameMessages", "new value is %f\n", performanceCost);
|
||||
|
||||
if (performanceCost == 0.0f) return;
|
||||
|
||||
auto zone = dZoneManager::Instance()->GetZone();
|
||||
const auto& worldId = zone->GetZoneID();
|
||||
const auto cloneId = worldId.GetCloneID();
|
||||
const auto zoneId = worldId.GetMapID();
|
||||
|
||||
auto updatePerformanceCostQuery = Database::CreatePreppedStmt("UPDATE properties SET performance_cost = ? WHERE clone_id = ? AND zone_id = ?");
|
||||
|
||||
updatePerformanceCostQuery->setDouble(1, performanceCost);
|
||||
updatePerformanceCostQuery->setInt(2, cloneId);
|
||||
updatePerformanceCostQuery->setInt(3, zoneId);
|
||||
|
||||
updatePerformanceCostQuery->execute();
|
||||
|
||||
delete updatePerformanceCostQuery;
|
||||
updatePerformanceCostQuery = nullptr;
|
||||
}
|
||||
|
||||
void GameMessages::HandleVehicleNotifyHitImaginationServer(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr)
|
||||
{
|
||||
|
@ -386,6 +386,8 @@ namespace GameMessages {
|
||||
bool bUseLeaderboards
|
||||
);
|
||||
|
||||
void HandleUpdatePropertyPerformanceCost(RakNet::BitStream* inStream, Entity* entity, const SystemAddress& sysAddr);
|
||||
|
||||
void SendNotifyClientShootingGalleryScore(LWOOBJID objectId, const SystemAddress& sysAddr,
|
||||
float addTime,
|
||||
int32_t score,
|
||||
|
Loading…
Reference in New Issue
Block a user