Jump to content

daveh

Members
  • Posts

    38
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by daveh

  1. What bug does the patch fix? What features does the patch add? This fixes the bug introduced by [7901] For which repository revision was the patch created? 7910 Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. no Who has been writing this patch? Please include either forum user names or email addresses. me. Patch: diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index b7e116e..3faabb2 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10332,7 +10332,7 @@ void CharmInfo::InitPetActionBar() SetActionBar(i + 7,COMMAND_ATTACK - i,ACT_REACTION); } for(uint32 i = 0; i < 4; ++i) - SetActionBar(i,0,ACT_DISABLED); + SetActionBar(i+3,0,ACT_DISABLED); } void CharmInfo::InitEmptyActionBar()
  2. Seems doesn't work since [7901].
  3. Hi, I just found pet doesn't update status when player accepted or finished the quest. I've post a new fix, please review, thanks.
  4. Yes, it's right. You can check table creature_template, both are level 1.
  5. aha, Westfall Chicken does have health & level 1, you can try Great Horned Owl in Darnassus. btw, to clean client cache, just delete your <WoW>\\Cache folder, ok, I think maybe it's not necessary.
  6. * What bug does the patch fix? What features does the patch add? On Children's Week, can't get quest from the summoned Human Orphan who is a MINI_PET. * For which repository revision was the patch created? [7743] UDB 371 * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. No * Who has been writing this patch? Please include either forum user names or email addresses. Me. 1. set UNIT_NPC_FLAGS for summoned MINI_PET, so he can be a quest giver diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 30d2c62..74b7a59 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -5970,9 +5970,8 @@ void Spell::EffectSummonCritter(uint32 i) critter->AIM_Initialize(); critter->InitPetCreateSpells(); // e.g. disgusting oo - critter->SetMaxHealth(1); - critter->SetHealth(1); - critter->SetLevel(1); + critter->SelectLevel(critter->GetCreatureInfo()); + critter->SetUInt32Value(UNIT_NPC_FLAGS, critter->GetCreatureInfo()->npcflag); // set timer for unsummon int32 duration = GetSpellDuration(m_spellInfo); 2. allow player interact with MINI_PET diff --git a/src/game/Player.cpp b/src/game/Player.cpp index fa8d925..5a1e49a 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -1978,8 +1978,8 @@ Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask) if(!unit->isAlive() && (!unit->isSpiritService() || isAlive() )) return NULL; - // not allow interaction under control - if(unit->GetCharmerOrOwnerGUID()) + // allow interaction if under player's control, else not + if (unit->GetCharmerOrOwnerGUID() && unit->GetCharmerOrOwnerGUID() != GetGUID()) return NULL; // not enemy 3. I don't know why Map::GetCreature can't find summoned MINI_PET(on Linux), so 2nd try diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 27b9a21..83b50c9 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -2536,6 +2536,10 @@ Creature* Map::GetCreature(uint64 guid) { Creature * ret = ObjectAccessor::GetObjectInWorld(guid, (Creature*)NULL); + + if (!ret) + ret = (Creature *)ObjectAccessor::GetObjectInWorld(guid, (Unit*)NULL); + if(!ret) return NULL;
  7. Works for me. Maybe you should clean your client Cache, or check table creature_template?
  8. * What bug does the patch fix? What features does the patch add? Both health & level of summoned MINI_PET are 1, this fix makes it more bllizzlike. * For which repository revision was the patch created? [7743] * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. No * Who has been writing this patch? Please include either forum user names or email addresses. Me. Patch: diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 30d2c62..f5015e8 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -5970,9 +5970,7 @@ void Spell::EffectSummonCritter(uint32 i) critter->AIM_Initialize(); critter->InitPetCreateSpells(); // e.g. disgusting oo - critter->SetMaxHealth(1); - critter->SetHealth(1); - critter->SetLevel(1); + critter->SelectLevel(critter->GetCreatureInfo()); // set timer for unsummon int32 duration = GetSpellDuration(m_spellInfo);
  9. Hi, the url is broken http://pastebin.ca/1367184 Where can I find the newer patch, or is it about to be applied?
  10. Hi, any comments? Can we have this patch for localisation gossip text?
  11. Hi, could you please post what error? This patch doesn't effect any existing code, and with slight change we can support localisation gossip text.
  12. Yes, also work with mangos core or universal script.
  13. * What bug does the patch fix? What features does the patch add? No mangos bug fix. Add new GossipMenu::AddMenuItem functions with int32 textID params, so scriptdev can localize gossip text easily. eg: Orig code: #define GOSSIP_TEXT_BANK "The bank" player->ADD_GOSSIP_ITEM( 0, GOSSIP_TEXT_BANK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); With this patch, we can move #define string to DB and localize it: INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1000100,'The bank',0,0,0,0,'guard GOSSIP_TEXT_BANK'); And change the #define to #define GOSSIP_TEXT_BANK -1000100 No need to touch any existing code: player->ADD_GOSSIP_ITEM( 0, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); * For which repository revision was the patch created? [7670] * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. No * Who has been writing this patch? Please include either forum user names or email addresses. Me. Patch URL. Patch: diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp index 2eefba6..5b324e6 100644 --- a/src/game/GossipDef.cpp +++ b/src/game/GossipDef.cpp @@ -27,6 +27,7 @@ GossipMenu::GossipMenu() { m_gItems.reserve(16); // can be set for max from most often sizes to speedup push_back and less memory use + m_pSession = NULL; } GossipMenu::~GossipMenu() @@ -66,6 +67,25 @@ void GossipMenu::AddMenuItem(uint8 Icon, char const* Message, uint32 dtSender, u AddMenuItem(Icon, std::string(Message ? Message : ""), dtSender, dtAction, std::string(BoxMessage ? BoxMessage : ""), BoxMoney, Coded); } +void GossipMenu::AddMenuItem(uint8 Icon, int32 MessageID, bool Coded) +{ + char const* Message = m_pSession ? m_pSession->GetMangosString(MessageID) : objmgr.GetMangosStringForDBCLocale(MessageID); + AddMenuItem(Icon, std::string(Message ? Message : ""),Coded); +} + +void GossipMenu::AddMenuItem(uint8 Icon, int32 MessageID, uint32 dtSender, uint32 dtAction, char const* BoxMessage, uint32 BoxMoney, bool Coded) +{ + char const* Message = m_pSession ? m_pSession->GetMangosString(MessageID) : objmgr.GetMangosStringForDBCLocale(MessageID); + AddMenuItem(Icon, std::string(Message ? Message : ""), dtSender, dtAction, std::string(BoxMessage ? BoxMessage : ""), BoxMoney, Coded); +} + +void GossipMenu::AddMenuItem(uint8 Icon, int32 MessageID, uint32 dtSender, uint32 dtAction, int32 BoxMessageID, uint32 BoxMoney, bool Coded) +{ + char const* Message = m_pSession ? m_pSession->GetMangosString(MessageID) : objmgr.GetMangosStringForDBCLocale(MessageID); + char const* BoxMessage = m_pSession ? m_pSession->GetMangosString(MessageID) : objmgr.GetMangosStringForDBCLocale(BoxMessageID); + AddMenuItem(Icon, std::string(Message ? Message : ""), dtSender, dtAction, std::string(BoxMessage ? BoxMessage : ""), BoxMoney, Coded); +} + uint32 GossipMenu::MenuItemSender( unsigned int ItemId ) { if ( ItemId >= m_gItems.size() ) return 0; @@ -94,6 +114,7 @@ void GossipMenu::ClearMenu() PlayerMenu::PlayerMenu( WorldSession *session ) : pSession(session) { + mGossipMenu.SetWorldSession(pSession); } PlayerMenu::~PlayerMenu() diff --git a/src/game/GossipDef.h b/src/game/GossipDef.h index ea31b4c..e9839b8 100644 --- a/src/game/GossipDef.h +++ b/src/game/GossipDef.h @@ -108,6 +108,10 @@ class MANGOS_DLL_SPEC GossipMenu void AddMenuItem(uint8 Icon, char const* Message, bool Coded = false); void AddMenuItem(uint8 Icon, char const* Message, uint32 dtSender, uint32 dtAction, char const* BoxMessage, uint32 BoxMoney, bool Coded = false); + void AddMenuItem(uint8 Icon, int32 MessageID, bool Coded = false); + void AddMenuItem(uint8 Icon, int32 MessageID, uint32 dtSender, uint32 dtAction, char const* BoxMessage, uint32 BoxMoney, bool Coded = false); + void AddMenuItem(uint8 Icon, int32 MessageID, uint32 dtSender, uint32 dtAction, int32 BoxMessageID, uint32 BoxMoney, bool Coded = false); + unsigned int MenuItemCount() const { return m_gItems.size(); @@ -129,8 +133,11 @@ class MANGOS_DLL_SPEC GossipMenu void ClearMenu(); + void SetWorldSession(WorldSession* session) { m_pSession = session; } + protected: GossipMenuItemList m_gItems; + WorldSession* m_pSession; }; class QuestMenu
×
×
  • 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