Jump to content

Bjago

Members
  • Posts

    3
  • Joined

  • Last visited

  • Donations

    0.00 GBP 

Everything posted by Bjago

  1. Good evening! While translating my server further into my origin language I experienced the following behavior (beside the fact it almost drove me crazy finding out about where the script is hiding): When talking to Prospector Anvilward while having the quest 'The Dwarven Spy' (ID 8483) uncompleted the script 'npc_prospector_anvilward' adds a gossip option to the usual gossip_hello. Clicking on this gossip option shows another gossip text with another gossip option below (adds another gossip option). The error takes place when closing the dialogue in both situations. first error: the second gossip option, which should only be shown after the first gossip option is clicked, is now also shown beside the first gossip option second error: the first gossip option is added every time talking to the dwarf. Means the script adds the same gossip option over and over again every time talking to him. When talking to another NPC (e. g. Ley-Keeper Caidanis beside him) the chat resets. The function of the script after clicking the second gossip option is working as intended to! Hope it's clear what I'm trying to say. I attached some pictures and named them accordingly. Affected NPC: Prospector Anvilward (Entry 15420 Guid 55371) Script path: \src\modules\SD3\scripts\eastern_kingdoms\eversong_woods.cpp Affected script name: npc_prospector_anvilward Affected lines: 353 - 384 Affected code: bool OnGossipHello(Player* pPlayer, Creature* pCreature) override { if (pPlayer->GetQuestStatus(QUEST_THE_DWARVEN_SPY) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MOMENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_MOMENT, pCreature->GetObjectGuid()); return true; } bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) override { pPlayer->PlayerTalkClass->ClearMenus(); switch (uiAction) { case GOSSIP_ACTION_INFO_DEF + 1: pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SHOW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_ID_SHOW, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 2: pPlayer->CLOSE_GOSSIP_MENU(); if (npc_prospector_anvilwardAI* pEscortAI = dynamic_cast<npc_prospector_anvilwardAI*>(pCreature->AI())) { pEscortAI->Start(false, pPlayer); } break; } return true; } I have absolute no idea how to fix that in an appropriate way since I only have basic understanding for this language. Maybe it would already be sufficient to just add another "pPlayer->PlayerTalkClass->ClearMenus();" after the first query for checking the uncompleted quest? I would appreciate it getting this fixed in any further release. Thank you! Sorry for my bad english Kind regards
  2. Code originally changed from bool prof = SpellMgr::IsProfessionSpell(trainer_spell->learnedSpell); // check level requirement if (!prof || GetSession()->GetSecurity() < AccountTypes(sWorld.getConfig(CONFIG_UINT32_TRADE_SKILL_GMIGNORE_LEVEL))) { if (getLevel() < reqLevel) { return TRAINER_SPELL_RED; } } on lines 4748-4757 in v22.02.65 to this bool prof = SpellMgr::IsProfessionSpell(trainer_spell->spell); if (prof || trainer_spell->reqLevel && (trainer_spell->reqLevel) < reqLevel) { return TRAINER_SPELL_RED; } on lines 4763-4767 in v22.02.67 I thought it could have happened accidentally that the function getLevel() was not taken over bc it worked before and now it's discarded. Made not much sense imho but I am no software developer so I haven't been able to figure out more about what's behind the dynamic properties yet. Just looked for the explicit difference between these two versions for now. Happy to help!
  3. Good evening! I experienced a strange behavior of all the class trainers. On my server all spells are green (and also buyable) every time speaking to a class trainer. But every time after buying one spell, all the others which are usually not buyable at this moment are turning red. There are no wrong spells shown or anything like that. Its just all about the level requirements of the spells, they seemed to be ignored at the beginning. After closing the interface and talking to the trainer again, it's the same behavior, every spell is buyable, but after buying one spell, everything is fine again. I'm not very experienced in these things but I managed to find out that these bug took place within the changes made from v22.02.65 to v22.02.67 and I think it might belong to line 4764 in src\game\Object\Player.cpp where I changed if (prof || trainer_spell->reqLevel && (trainer_spell->reqLevel) < reqLevel) to the following based on the changes made between both versions if (prof || trainer_spell->reqLevel && (getLevel() < reqLevel)) Within the latest repository from git and compiled with VS2022 it works as intended to! Tested again without named change it shows the described behavior. I would appreciate if you can test it and take over this change with the next release. Please don't hesitate to contact me if further informations are needed. Sorry for my bad english :) Kind Regards
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use