Jump to content

Toinan67

Members
  • Posts

    389
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Toinan67

  1. * What bug does the patch fix? What features does the patch add? Fix a typo in Chat.cpp and Chat.h : "CheckIntergrity" -> "CheckIntegrity" * For which repository revision was the patch created? 10277+ * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. Didn't found any * Who has been writing this patch? Please include either forum user names or email addresses. porteyoplait (=me) Here is the patch : http://paste2.org/p/929089
  2. Confirmed, especially the criticism % (I made a mage and had 80%). However I didn't see 0 in everything else. But I saw druid with something like 800k armor, maybe all is related?
  3. * What bug does the patch fix? What features does the patch add? -Fix some memory leaks in Guild.cpp, precisely in the Disband method. -Delete the items that are stored in the guild bank when the guild is deleted. * For which repository revision was the patch created? 10272 * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. Didn't found any * Who has been writing this patch? Please include either forum user names or email addresses. porteyoplait (=me) Compiles right, but needs testing. Correct me if I'm wrong! Here is the patch : diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index a89235f..06350a7 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -691,7 +691,20 @@ void Guild::Disband() CharacterDatabase.PExecute("DELETE FROM guild WHERE guildid = '%u'", m_Id); CharacterDatabase.PExecute("DELETE FROM guild_rank WHERE guildid = '%u'", m_Id); CharacterDatabase.PExecute("DELETE FROM guild_bank_tab WHERE guildid = '%u'", m_Id); - // TODO item_instance should be deleted ? + //Free bank tab used memory and delete items stored in them + uint8 i = 0; + for (i = 0; i < m_PurchasedTabs; ++i) { + for (uint8 j = 0; j < GUILD_BANK_MAX_SLOTS; ++j) { + if (Item* pItem = m_TabListMap[i]->Slots[j]) { + pItem->DeleteFromDB(); + delete pItem; + } + } + delete m_TabListMap[i]; + } + + for (; i < m_TabListMap.size(); ++i) + delete m_TabListMap[i]; CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE guildid = '%u'", m_Id); CharacterDatabase.PExecute("DELETE FROM guild_bank_right WHERE guildid = '%u'", m_Id); CharacterDatabase.PExecute("DELETE FROM guild_bank_eventlog WHERE guildid = '%u'", m_Id); Thanks for future answers
  4. I prefer to be sure the patch is not wrong at 100%. Well let's try it!
  5. 1) "This must be fixed faster" -> give us patches to fix it faster? Or if you can't, don't ask devs to work faster. They will indeed work infinitely faster than you. 2) "or we risk losing players" -> who cares about your players?... 3) "server devs in favor to Trinity core" -> Noooo please stay with us, you bring so much to the MaNGOS community.
  6. Hi, I (maybe I'm wrong) noticed some mem leaks in Guild.cpp. do { Field *fields = result->Fetch(); uint8 TabId = fields[0].GetUInt8(); GuildBankTab *NewTab = new GuildBankTab; memset(NewTab->Slots, 0, GUILD_BANK_MAX_SLOTS * sizeof(Item*)); NewTab->Name = fields[1].GetCppString(); NewTab->Icon = fields[2].GetCppString(); NewTab->Text = fields[3].GetCppString(); m_TabListMap[TabId] = NewTab; } while (result->NextRow()); You can see the new GuildBankTab. And, when the guild is disbanded : void Guild::Disband() { BroadcastEvent(GE_DISBANDED, 0, 0, "", "", ""); while (!members.empty()) { MemberList::const_iterator itr = members.begin(); DelMember(MAKE_NEW_GUID(itr->first, 0, HIGHGUID_PLAYER), true); } CharacterDatabase.BeginTransaction(); CharacterDatabase.PExecute("DELETE FROM guild WHERE guildid = '%u'", m_Id); CharacterDatabase.PExecute("DELETE FROM guild_rank WHERE guildid = '%u'", m_Id); CharacterDatabase.PExecute("DELETE FROM guild_bank_tab WHERE guildid = '%u'", m_Id); // TODO item_instance should be deleted ? CharacterDatabase.PExecute("DELETE FROM guild_bank_item WHERE guildid = '%u'", m_Id); CharacterDatabase.PExecute("DELETE FROM guild_bank_right WHERE guildid = '%u'", m_Id); CharacterDatabase.PExecute("DELETE FROM guild_bank_eventlog WHERE guildid = '%u'", m_Id); CharacterDatabase.PExecute("DELETE FROM guild_eventlog WHERE guildid = '%u'", m_Id); CharacterDatabase.CommitTransaction(); sObjectMgr.RemoveGuild(m_Id); } Nothing is released. Same things for the items in the guild bank. So maybe something like this would be nice : uint8 i = 0; for (i = 0; i < m_PurchasedTabs; ++i) { for (uint8 j = 0; j < GUILD_BANK_MAX_SLOTS; ++j) { if (Item* pItem = m_TabListMap[i]->Slots[j]) { pItem->DeleteFromDB(); delete pItem; } } delete m_TabListMap[i]; } for (; i < m_TabListMap.size(); ++i) delete m_TabListMap[i]; (Placed somewhere in Guild :: Disband) This would also permit to delete the items from the DB (delete from item_instance). What do you think about it? It's just a question actually, not sure at all if I'm right
  7. I have same rev, but not as much crashes as you. Maybe custom patches problem? I think you should try with a clean core, to see if it's clean-core-related/DB-related problem or custom patches
  8. I quite agree with you, and I think donators should be listed on a special page (like wikipedia does for example). Every time I see a "Donator", that changes the way I read his post, like "He donated so what he says must be right". x) It's nice to donate, of course, but it's even more nice to donate without having anything concrete back. I'd not say no the the "Donator" title and the orange nick, simply because of what I said before : I would have the feeling to be more "respected". And that's bad, as you said we should be respected for our donations of code. So maybe let the choice to members (even if I doubt a lot of people will hide their donator status...), or simply create a "Donator list" somewhere. That would make shine the community, instead of the title and orange nick which only makes shine the single donator you're reading
  9. * What bug does the patch fix? What features does the patch add? Implements ATTACKING_TARGET_RANDOM_PLAYER, ATTACKING_TARGET_TOPAGGRO_PLAYER and ATTACKING_TARGET_BOTTOMAGGRO_PLAYER in Creature::SelectAttackingTarget * For which repository revision was the patch created? 10249 * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. no (it's not a bug) * Who has been writing this patch? Please include either forum user names or email addresses. porteyoplait (=me) I didn't test it, but it compiles, and should work. Here is the patch : http://paste2.org/p/924798
  10. that's exactly how I feel too ^^ like "oh my god he's a donator, he roxx" but it is not the subject of the thread! donate, people!
  11. A donation is not made to have something in return... Do you think having your nick in orange will make you more important?
  12. You have totally clean core + totally clean SD2, and still crashes? I really don't see why http://bit.ly/aguN6n would be the cause.... cinfo is local to the function there, no relations elsewhere.
  13. So it seems to be a BG problem Do you have any custom patches? And btw, wrong section!
  14. I noticed some commits about InstanceSaveMgr recently, maybe try with the newest rev?
  15. Of course we'll help! Hope 10€ will be enough And I hope your wife will recover soon! Best regards
  16. Could you add more information please? Like when does it freeze? ^^
  17. Learn C++ first Then look at those files and ask questions if you have. Edit : and btw, bad section.
  18. Hi, I was looking at Unit::_UpdateAutoRepeatSpell code and I saw this : //check movement if (GetTypeId() == TYPEID_PLAYER && ((Player*)this)->isMoving()) { // cancel wand shoot if(!isAutoShot) InterruptSpell(CURRENT_AUTOREPEAT_SPELL); // auto shot just waits return; } (movement checking before casting auto-repeat spell) Then we call Spell::CheckCast : // Check if able to cast if(m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->CheckCast(true) != SPELL_CAST_OK) { InterruptSpell(CURRENT_AUTOREPEAT_SPELL); return; } // we want to shoot Spell* spell = new Spell(this, m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo, true, 0); spell->prepare(&(m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_targets)); But in CheckCast we have this : // cancel autorepeat spells if cast start when moving // (not wand currently autorepeat cast delayed to moving stop anyway in spell update code) if( m_caster->GetTypeId() == TYPEID_PLAYER && ((Player*)m_caster)->isMoving() ) { // skip stuck spell to allow use it in falling case and apply spell limitations at movement if( (!((Player*)m_caster)->m_movementInfo.HasMovementFlag(MOVEFLAG_FALLINGFAR) || m_spellInfo->Effect[EFFECT_INDEX_0] != SPELL_EFFECT_STUCK) && (IsAutoRepeat() || (m_spellInfo->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_SEATED) != 0) ) return SPELL_FAILED_MOVING; } So, why the first part is there? Thanks for your answer Edit : Moreover, why do we have to call CheckCast explicitly in _UpdateAutoRepeatSpell, whereas it is called by Spell::Prepare a few lines later?
  19. * What bug does the patch fix? What features does the patch add? In this commit has been implemented the ROLL_VOTE_DISENCHANT disable mask. The player can't roll disenchant if he has not required skill in enchant, but he should be able to roll if someone in his group has enough skill; and that's what the patch adds. * For which repository revision was the patch created? 10215 * 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. porteyoplait (=me) diff --git a/src/game/Group.cpp b/src/game/Group.cpp index b38cf9f..48eb75d 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -636,7 +636,19 @@ RollVoteMask Group::GetVoteMaskFor( ItemPrototype const* itemProto, Player* play if (itemProto->Flags2 & ITEM_FLAGS2_NEED_ROLL_DISABLED) mask = RollVoteMask(mask & ~ROLL_VOTE_MASK_NEED); - if (!itemProto->DisenchantID || uint32(itemProto->RequiredDisenchantSkill) > player->GetSkillValue(SKILL_ENCHANTING)) + //Player can loot disenchant if someone in the group has required skill + bool groupMemberHasEnchantSkill = false; + for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next()) + { + Player* pGroupMember = itr->getSource(); + if (pGroupMember && pGroupMember->GetSkillValue(SKILL_ENCHANTING) >= uint32(itemProto->RequiredDisenchantSkill)) + { + groupMemberHasEnchantSkill = true; + break; + } + } + + if (!itemProto->DisenchantID || !groupMemberHasEnchantSkill) mask = RollVoteMask(mask & ~ROLL_VOTE_MASK_DISENCHANT); return mask; It may not be the best way however...
  20. I have access, is the problem still there? If yes, what should I test?
  21. Recompile : make (-j2 if you have a dual core or -j4 if you have a quad) make install (-j2/-j4) That's it!
  22. You should learn how to search something in the core All mangos commands are stored in Chat.cpp, with the function that makes it work. You should have something like that in this file : static ChatCommand debugPlayCommandTable[] = { { "cinematic", SEC_MODERATOR, false, &ChatHandler::HandleDebugPlayCinematicCommand, "", NULL }, { "movie", SEC_MODERATOR, false, &ChatHandler::HandleDebugPlayMovieCommand, "", NULL }, { "sound", SEC_MODERATOR, false, &ChatHandler::HandleDebugPlaySoundCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; And there you go, you found the function : HandleDebugPlaySoundCommand. With a little research, you can find this function in debugcmds.cpp Now you just have to modify it so that it send the sounds to all players instead of only one. Try it on your own!
  23. It's annoying at the beginning, but when you get used to it, it will take less time to script a boss using EventAI than with SD2. And even less time if we had a nice boss-creating tool that would traduce what we want in SQL. +1 It's a question of good sense, the perfect way would be no C++ scripts at all, only DB-based boss, even if scripting in C++ in a lot more interesting than EventAI. But for now, EventAI is not complete enough to do everything we want.
×
×
  • 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