mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 13:16:39 +00:00
[Zones] Convert Get/Set of Zone Timezone to Repositories (#3946)
* [Zones] Convert Get/Set of Zone Timezone to Repositories - Convert `GetZoneTimezone()` and `SetZoneTimeZone()` to repositories. * Update time_zone.cpp
This commit is contained in:
@@ -44,7 +44,20 @@ public:
|
||||
*/
|
||||
|
||||
// Custom extended repository methods here
|
||||
static bool SetTimeZone(Database& db, uint32 zone_id, uint32 instance_version, uint32 timezone)
|
||||
{
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE `{}` SET `timezone` = {} WHERE `zoneidnumber` = {} AND `version` = {}",
|
||||
TableName(),
|
||||
timezone,
|
||||
zone_id,
|
||||
instance_version
|
||||
)
|
||||
);
|
||||
|
||||
return results.Success();
|
||||
}
|
||||
};
|
||||
|
||||
#endif //EQEMU_ZONE_REPOSITORY_H
|
||||
|
||||
Reference in New Issue
Block a user