mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Bug Fix] Fix reusing timers (#4199)
Fixes regression from #4099 where timers that were reused were not getting changed with their updated times
This commit is contained in:
parent
66cc947b2a
commit
e4157f0221
@ -380,12 +380,12 @@ void Perl__settimer(std::string timer_name, uint32 seconds)
|
|||||||
|
|
||||||
void Perl__settimer(std::string timer_name, uint32 seconds, Mob* m)
|
void Perl__settimer(std::string timer_name, uint32 seconds, Mob* m)
|
||||||
{
|
{
|
||||||
quest_manager.settimer(timer_name, seconds);
|
quest_manager.settimer(timer_name, seconds, m);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Perl__settimer(std::string timer_name, uint32 seconds, EQ::ItemInstance* inst)
|
void Perl__settimer(std::string timer_name, uint32 seconds, EQ::ItemInstance* inst)
|
||||||
{
|
{
|
||||||
quest_manager.settimer(timer_name, seconds);
|
quest_manager.settimerMS(timer_name, seconds * 1000, inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Perl__settimerMS(std::string timer_name, uint32 milliseconds)
|
void Perl__settimerMS(std::string timer_name, uint32 milliseconds)
|
||||||
@ -6693,9 +6693,9 @@ void perl_register_quest()
|
|||||||
package.add("settarget", &Perl__settarget);
|
package.add("settarget", &Perl__settarget);
|
||||||
package.add("settime", (void(*)(int, int))&Perl__settime);
|
package.add("settime", (void(*)(int, int))&Perl__settime);
|
||||||
package.add("settime", (void(*)(int, int, bool))&Perl__settime);
|
package.add("settime", (void(*)(int, int, bool))&Perl__settime);
|
||||||
package.add("settimer", (void(*)(std::string, uint32))&Perl__settimer),
|
package.add("settimer", (void(*)(std::string, uint32))&Perl__settimer);
|
||||||
package.add("settimer", (void(*)(std::string, uint32, EQ::ItemInstance*))&Perl__settimer),
|
package.add("settimer", (void(*)(std::string, uint32, EQ::ItemInstance*))&Perl__settimer);
|
||||||
package.add("settimer", (void(*)(std::string, uint32, Mob*))&Perl__settimer),
|
package.add("settimer", (void(*)(std::string, uint32, Mob*))&Perl__settimer);
|
||||||
package.add("settimerMS", (void(*)(std::string, uint32))&Perl__settimerMS);
|
package.add("settimerMS", (void(*)(std::string, uint32))&Perl__settimerMS);
|
||||||
package.add("settimerMS", (void(*)(std::string, uint32, EQ::ItemInstance*))&Perl__settimerMS);
|
package.add("settimerMS", (void(*)(std::string, uint32, EQ::ItemInstance*))&Perl__settimerMS);
|
||||||
package.add("settimerMS", (void(*)(std::string, uint32, Mob*))&Perl__settimerMS);
|
package.add("settimerMS", (void(*)(std::string, uint32, Mob*))&Perl__settimerMS);
|
||||||
|
|||||||
@ -537,9 +537,8 @@ void QuestManager::settimer(const std::string& timer_name, uint32 seconds, Mob*
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!QTimerList.empty()) {
|
if (!QTimerList.empty()) {
|
||||||
for (auto e : QTimerList) {
|
for (auto& e : QTimerList) {
|
||||||
if (e.mob && e.mob == mob && e.name == timer_name) {
|
if (e.mob && e.mob == mob && e.name == timer_name) {
|
||||||
e.Timer_.Enable();
|
|
||||||
e.Timer_.Start(seconds * 1000, false);
|
e.Timer_.Start(seconds * 1000, false);
|
||||||
|
|
||||||
if (has_start_event) {
|
if (has_start_event) {
|
||||||
@ -613,9 +612,8 @@ void QuestManager::settimerMS(const std::string& timer_name, uint32 milliseconds
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!QTimerList.empty()) {
|
if (!QTimerList.empty()) {
|
||||||
for (auto e : QTimerList) {
|
for (auto& e : QTimerList) {
|
||||||
if (e.mob && e.mob == owner && e.name == timer_name) {
|
if (e.mob && e.mob == owner && e.name == timer_name) {
|
||||||
e.Timer_.Enable();
|
|
||||||
e.Timer_.Start(milliseconds, false);
|
e.Timer_.Start(milliseconds, false);
|
||||||
|
|
||||||
if (has_start_event) {
|
if (has_start_event) {
|
||||||
@ -678,9 +676,8 @@ void QuestManager::settimerMS(const std::string& timer_name, uint32 milliseconds
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!QTimerList.empty()) {
|
if (!QTimerList.empty()) {
|
||||||
for (auto e : QTimerList) {
|
for (auto& e : QTimerList) {
|
||||||
if (e.mob && e.mob == m && e.name == timer_name) {
|
if (e.mob && e.mob == m && e.name == timer_name) {
|
||||||
e.Timer_.Enable();
|
|
||||||
e.Timer_.Start(milliseconds, false);
|
e.Timer_.Start(milliseconds, false);
|
||||||
|
|
||||||
if (has_start_event) {
|
if (has_start_event) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user