mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-13 14:02:25 +00:00
Fix for tutorial button kicking client when re-entering tutorial (return home button for RoF/RoF2 issue still at large)
This commit is contained in:
parent
a0ea6066ed
commit
2bed129037
@ -741,9 +741,12 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
|||||||
bool home_enabled = false;
|
bool home_enabled = false;
|
||||||
for (auto row = tgh_results.begin(); row != tgh_results.end(); ++row) {
|
for (auto row = tgh_results.begin(); row != tgh_results.end(); ++row) {
|
||||||
if (strcasecmp(row[1], char_name) == 0) {
|
if (strcasecmp(row[1], char_name) == 0) {
|
||||||
if (RuleB(World, EnableTutorialButton) && ((uint8)atoi(row[2]) <= RuleI(World, MaxLevelForTutorial))) {
|
if (RuleB(World, EnableReturnHomeButton)) {
|
||||||
home_enabled = true;
|
int now = time(nullptr);
|
||||||
break;
|
if ((now - atoi(row[3])) >= RuleI(World, MinOfflineTimeToReturnHome)) {
|
||||||
|
home_enabled = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -764,12 +767,9 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
|||||||
bool tutorial_enabled = false;
|
bool tutorial_enabled = false;
|
||||||
for (auto row = tgh_results.begin(); row != tgh_results.end(); ++row) {
|
for (auto row = tgh_results.begin(); row != tgh_results.end(); ++row) {
|
||||||
if (strcasecmp(row[1], char_name) == 0) {
|
if (strcasecmp(row[1], char_name) == 0) {
|
||||||
if (RuleB(World, EnableReturnHomeButton)) {
|
if (RuleB(World, EnableTutorialButton) && ((uint8)atoi(row[2]) <= RuleI(World, MaxLevelForTutorial))) {
|
||||||
int now = time(nullptr);
|
tutorial_enabled = true;
|
||||||
if ((now - atoi(row[3])) >= RuleI(World, MinOfflineTimeToReturnHome)) {
|
break;
|
||||||
tutorial_enabled = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user