mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-20 13:48:22 +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:
+5
-5
@@ -741,12 +741,15 @@ 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)) {
|
||||||
|
int now = time(nullptr);
|
||||||
|
if ((now - atoi(row[3])) >= RuleI(World, MinOfflineTimeToReturnHome)) {
|
||||||
home_enabled = true;
|
home_enabled = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (home_enabled) {
|
if (home_enabled) {
|
||||||
zoneID = database.MoveCharacterToBind(charid, 4);
|
zoneID = database.MoveCharacterToBind(charid, 4);
|
||||||
@@ -764,15 +767,12 @@ 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);
|
|
||||||
if ((now - atoi(row[3])) >= RuleI(World, MinOfflineTimeToReturnHome)) {
|
|
||||||
tutorial_enabled = true;
|
tutorial_enabled = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (tutorial_enabled) {
|
if (tutorial_enabled) {
|
||||||
zoneID = RuleI(World, TutorialZoneID);
|
zoneID = RuleI(World, TutorialZoneID);
|
||||||
|
|||||||
Reference in New Issue
Block a user