mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-24 16:42:24 +00:00
[Quest API] Add LavaDamage and MinLavaDamage to UpdateZoneHeader in Perl/Lua. (#1578)
Allows operators to modify lava damage dynamically.
This commit is contained in:
parent
8c5f26ca5e
commit
ff46a854f9
@ -3326,12 +3326,11 @@ void QuestManager::UpdateZoneHeader(std::string type, std::string value) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
zone->newzone_data.fog_maxclip[i] = atof(value.c_str());
|
||||
}
|
||||
}
|
||||
else if (strcasecmp(type.c_str(), "gravity") == 0)
|
||||
} else if (strcasecmp(type.c_str(), "gravity") == 0) {
|
||||
zone->newzone_data.gravity = atof(value.c_str());
|
||||
else if (strcasecmp(type.c_str(), "time_type") == 0)
|
||||
} else if (strcasecmp(type.c_str(), "time_type") == 0) {
|
||||
zone->newzone_data.time_type = atoi(value.c_str());
|
||||
else if (strcasecmp(type.c_str(), "rain_chance") == 0) {
|
||||
} else if (strcasecmp(type.c_str(), "rain_chance") == 0) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
zone->newzone_data.rain_chance[i] = atoi(value.c_str());
|
||||
}
|
||||
@ -3347,27 +3346,31 @@ void QuestManager::UpdateZoneHeader(std::string type, std::string value) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
zone->newzone_data.snow_duration[i] = atoi(value.c_str());
|
||||
}
|
||||
}
|
||||
else if (strcasecmp(type.c_str(), "sky") == 0)
|
||||
} else if (strcasecmp(type.c_str(), "sky") == 0) {
|
||||
zone->newzone_data.sky = atoi(value.c_str());
|
||||
else if (strcasecmp(type.c_str(), "safe_x") == 0)
|
||||
} else if (strcasecmp(type.c_str(), "safe_x") == 0) {
|
||||
zone->newzone_data.safe_x = atof(value.c_str());
|
||||
else if (strcasecmp(type.c_str(), "safe_y") == 0)
|
||||
} else if (strcasecmp(type.c_str(), "safe_y") == 0) {
|
||||
zone->newzone_data.safe_y = atof(value.c_str());
|
||||
else if (strcasecmp(type.c_str(), "safe_z") == 0)
|
||||
} else if (strcasecmp(type.c_str(), "safe_z") == 0) {
|
||||
zone->newzone_data.safe_z = atof(value.c_str());
|
||||
else if (strcasecmp(type.c_str(), "max_z") == 0)
|
||||
} else if (strcasecmp(type.c_str(), "max_z") == 0) {
|
||||
zone->newzone_data.max_z = atof(value.c_str());
|
||||
else if (strcasecmp(type.c_str(), "underworld") == 0)
|
||||
} else if (strcasecmp(type.c_str(), "underworld") == 0) {
|
||||
zone->newzone_data.underworld = atof(value.c_str());
|
||||
else if (strcasecmp(type.c_str(), "minclip") == 0)
|
||||
} else if (strcasecmp(type.c_str(), "minclip") == 0) {
|
||||
zone->newzone_data.minclip = atof(value.c_str());
|
||||
else if (strcasecmp(type.c_str(), "maxclip") == 0)
|
||||
} else if (strcasecmp(type.c_str(), "maxclip") == 0) {
|
||||
zone->newzone_data.maxclip = atof(value.c_str());
|
||||
else if (strcasecmp(type.c_str(), "fog_density") == 0)
|
||||
} else if (strcasecmp(type.c_str(), "fog_density") == 0) {
|
||||
zone->newzone_data.fog_density = atof(value.c_str());
|
||||
else if (strcasecmp(type.c_str(), "suspendbuffs") == 0)
|
||||
} else if (strcasecmp(type.c_str(), "suspendbuffs") == 0) {
|
||||
zone->newzone_data.SuspendBuffs = atoi(value.c_str());
|
||||
} else if (strcasecmp(type.c_str(), "lavadamage") == 0) {
|
||||
zone->newzone_data.LavaDamage = atoi(value.c_str());
|
||||
} else if (strcasecmp(type.c_str(), "minlavadamage") == 0) {
|
||||
zone->newzone_data.MinLavaDamage = atoi(value.c_str());
|
||||
}
|
||||
|
||||
auto outapp = new EQApplicationPacket(OP_NewZone, sizeof(NewZone_Struct));
|
||||
memcpy(outapp->pBuffer, &zone->newzone_data, outapp->size);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user