mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Quest API] Fix LDoN Methods in Perl/Lua (#3287)
# Perl - Add `quest::removeldonloss(theme_id)`. - Add `quest::removeldonwin(theme_id)`. # Lua - Fix `eq.remove_ldon_win(theme_id)` as it was using `quest_manager.addldonwin(theme_id)` instead of `quest_manager.removeldonwin(theme_id)`.
This commit is contained in:
parent
445f967ed6
commit
21002c2e8a
@ -849,11 +849,21 @@ void Perl__addldonwin(uint32 theme_id)
|
||||
quest_manager.addldonwin(theme_id);
|
||||
}
|
||||
|
||||
void Perl__removeldonwin(uint32 theme_id)
|
||||
{
|
||||
quest_manager.removeldonwin(theme_id);
|
||||
}
|
||||
|
||||
void Perl__addldonloss(uint32 theme_id)
|
||||
{
|
||||
quest_manager.addldonloss(theme_id);
|
||||
}
|
||||
|
||||
void Perl__removeldonloss(uint32 theme_id)
|
||||
{
|
||||
quest_manager.removeldonloss(theme_id);
|
||||
}
|
||||
|
||||
void Perl__setnexthpevent(int at_mob_percentage)
|
||||
{
|
||||
quest_manager.setnexthpevent(at_mob_percentage);
|
||||
@ -4632,6 +4642,8 @@ void perl_register_quest()
|
||||
package.add("remove_expedition_lockout_by_char_id", &Perl__remove_expedition_lockout_by_char_id);
|
||||
package.add("removeitem", (void(*)(uint32_t))&Perl__removeitem);
|
||||
package.add("removeitem", (void(*)(uint32_t, int))&Perl__removeitem);
|
||||
package.add("removeldonloss", &Perl__removeldonloss);
|
||||
package.add("removeldonwin", &Perl__removeldonwin);
|
||||
package.add("removetitle", &Perl__removetitle);
|
||||
package.add("rename", &Perl__rename);
|
||||
package.add("repopzone", &Perl__repopzone);
|
||||
|
||||
@ -1987,7 +1987,7 @@ void lua_remove_ldon_loss(uint32 theme_id) {
|
||||
}
|
||||
|
||||
void lua_remove_ldon_win(uint32 theme_id) {
|
||||
quest_manager.addldonwin(theme_id);
|
||||
quest_manager.removeldonwin(theme_id);
|
||||
}
|
||||
|
||||
std::string lua_get_clean_npc_name_by_id(uint32 npc_id) {
|
||||
|
||||
@ -1763,34 +1763,40 @@ void QuestManager::resume() {
|
||||
owner->CastToNPC()->ResumeWandering();
|
||||
}
|
||||
|
||||
void QuestManager::addldonpoints(uint32 theme_id, int points) {
|
||||
void QuestManager::addldonpoints(uint32 theme_id, int points)
|
||||
{
|
||||
QuestManagerCurrentQuestVars();
|
||||
if(initiator)
|
||||
if (initiator) {
|
||||
initiator->UpdateLDoNPoints(theme_id, points);
|
||||
}
|
||||
}
|
||||
|
||||
void QuestManager::addldonloss(uint32 theme_id) {
|
||||
void QuestManager::addldonloss(uint32 theme_id)
|
||||
{
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (initiator) {
|
||||
initiator->UpdateLDoNWinLoss(theme_id);
|
||||
}
|
||||
}
|
||||
|
||||
void QuestManager::addldonwin(uint32 theme_id) {
|
||||
void QuestManager::addldonwin(uint32 theme_id)
|
||||
{
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (initiator) {
|
||||
initiator->UpdateLDoNWinLoss(theme_id, true);
|
||||
}
|
||||
}
|
||||
|
||||
void QuestManager::removeldonloss(uint32 theme_id) {
|
||||
void QuestManager::removeldonloss(uint32 theme_id)
|
||||
{
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (initiator) {
|
||||
initiator->UpdateLDoNWinLoss(theme_id, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
void QuestManager::removeldonwin(uint32 theme_id) {
|
||||
void QuestManager::removeldonwin(uint32 theme_id)
|
||||
{
|
||||
QuestManagerCurrentQuestVars();
|
||||
if (initiator) {
|
||||
initiator->UpdateLDoNWinLoss(theme_id, true, true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user