Jump to content

Schmoozerd

Members
  • Posts

    1078
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Schmoozerd

  1. so, now you see that your line is crashing at (last line) for(AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i) { switch((*i)->GetSpellProto()->SpellIconID) So, now you have to try to isolate the events, to reproduce the crash, and set a breakpoint there, to filter which auras aren't correctly removed and why
  2. No, I was happy to search for IsDeleted, and as I found points, I suggested to replace IsDeleted with looking into the removal list (to avoid additional problems with redundant data) But you have style reason "garbage list" and Zergtmn has very good technical reason to implement using the bool, and we all would love to see "to be deleted auras" to have IsDeleted() == true
  3. Shouldn't be a list of pointers be sorted, and hence as a better searching (like O(log n))? Well ok, ram: a player won't have in average more than 100 auras, there are 200 players online, so the additional bool (I think by now a byte and not more a bit) will take 20kb of ram => ok, perhaps better to keep the redundant information (except that every redundancy might yield problems if forgotten at one place)
  4. yes, the debug logs now include line numbers and a few more information, plus you are able to set breakpoints if you want to examine one case (can take a look at the variables at this moment, etc..) I knew it was german, but having a patch with '[' '.' and '<blanc>' is often complicated, if there was one bug with missing escapes somewhere in the IDE, my experience is, to better use simple file names and path for anything that is related to automatic processing and cheers that it now compiled
  5. hm, are you sure this var is still to be used? void Unit::Update( uint32 p_time ) { .... // WARNING! Order of execution here is important, do not change. // Spells must be processed with event system BEFORE they go to _UpdateSpells. // Or else we may have some SPELL_STATE_FINISHED spells stalled in pointers, that is bad. m_Events.Update( p_time ); _UpdateSpells( p_time ); CleanupDeletedAuras(); -- ------------- // shouldn't deleted auras be removed at very first? void Unit::CleanupDeletedAuras() { for (SpellAuraHolderList::const_iterator iter = m_deletedHolders.begin(); iter != m_deletedHolders.end(); ++iter) delete *iter; m_deletedHolders.clear(); // really delete auras "deleted" while processing its ApplyModify code for(AuraList::const_iterator itr = m_deletedAuras.begin(); itr != m_deletedAuras.end(); ++itr) delete *itr; m_deletedAuras.clear(); } I think we should replace IsDeleted with IsDeleted return m_deletedAuras.find(this) != m_deletedAuras.end();
  6. This is based on the Reguid & cleanup from The_Game_Master http://paste2.org/p/937328 seemed for me to work fine, (I think guild members of deleted guilds are missing in this script, but mangos takes care of them) @TGM for your guid changes I needed some adaptions (drop key, reapply key), but this was time consuming, so I never finished the script..
  7. yes, but if you take a look at the code, the real error (something like deleting aura without removing it from holder) is happening quite before, and this is where the error is happening
  8. actually Spell 42337: Effect 0: Id 134 (SPELL_EFFECT_KILL_CREDIT2) BasePoints = 1 Targets (6, 0) (TARGET_CHAIN_DAMAGE, NO_TARGET) EffectMiscValueA = 23727 perhaps this Effect isn't implemented proper, but I doubt this
  9. try clean project first, then compile again, perhaps your strange path "file://e:\\25.2.2010 System neu Aufspielen"... makes some problems, too
  10. have to agree with Zergtmn, perhaps the OP has a valid point about aura removal, but his example is just stupid and not reproducable. btw, 6 posts in 1.5 years and then flaming about the community when you get actuall content based answers doesn't put you into the best light
  11. you will get more information in the crash-log, if you compile your server in Debug Mode. and if it is really caused by an invalid target pointer, try to exactly reproduce, what is happening there, because most likely the error is happening somewhere before
  12. custom fixes that cause other problems, most likely though he might have a very correct point about problems with aura removal
  13. remove your custom stuff, post a crashlog, not server.log No Idea what you are doing to get errors like 2010-07-29 14:12:11 ERROR:CastCustomSpell: unknown spell id 24900 by caster: Player Fri (Guid: 14067) triggered by aura 768 (eff 0)
  14. I don't think it is related to any of the latest changes. I just tested pulling half naxx and had no problem at all (except lagg)
  15. What bug does the patch fix? What features does the patch add? Allows to use assigned scripts to GO-Fishinghole (these GOs are actually never used, but their looting is done on use of Fishingnode and a range-search for suitable pool) This is only used yet (afaik) for the lurker below, but hardcoding its entry, chance, (perhaps Instance-State?) is I think worse then put all these things to SD2 For which repository revision was the patch created? 10309 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 diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index c05e963..838b9e2 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -1136,7 +1136,10 @@ void GameObject::Use(Unit* user) GameObject* ok = LookupFishingHoleAround(20.0f + CONTACT_DISTANCE); if (ok) { - player->SendLoot(ok->GetGUID(),LOOT_FISHINGHOLE); + // If a script assigned, then use its !result to give loot + if (!Script->GOHello(player, ok)) + player->SendLoot(ok->GetGUID(),LOOT_FISHINGHOLE); + player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT, ok->GetGOInfo()->id); SetLootState(GO_JUST_DEACTIVATED); } Edit: Further use for the Lurker Below: * Assign SD2 Script to the GO Strange Pool * put there a go hello script, which has a chance to summon the lurker, else return false * summoning lurker with spell
  16. - for(int i = 0; i < MAX_BAG_SIZE; ++i) - if (m_bagslot[i]) - delete m_bagslot[i]; + m_bagslot.clear(); the clear of a vector just flushes the elements, not deletes them, so this might be a mem leak here either iterate the the m_bagslot or look if there is a for_each operator in C++ available And if I am not mistaken, there is no need to check a pointer before delete.
  17. and bump, this now should be better I think
  18. What bug does the patch fix? What features does the patch add? Implements function to start timed achievements For which repository revision was the patch created? 10305, 10346 Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. Some regarding single Achievements Who has been writing this patch? Please include either forum user names or email addresses. me, Schmoozerd Description of the new feature This function is used to Start the timer of an achievement in cases, where there is no relation between the criteria when an achievement is finished and when its timer should start. Patch: http://paste2.org/p/947434 Example: http://www.wowhead.com/achievement=1275 "Bombs Away" Complete the Fires Over Skettis quest in under 2 minutes 15 seconds while not in a group. This Achievement has Criteria = ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST, and hence the timer needs to be started manually on quest _accept_. There are many Boss Encounter Timed Achievements, but before we can think of the best hook for SD2 we need to get these basics straight. Other hooks for timed Events (Capture and return flag in time, ...) should be similar to the quest-accept Remark: This change, mainly if(criteria->timeLimit) { time_t now = time(NULL); - if(time_t(progress->date + criteria->timeLimit) < now) - progress->counter = 1; - - // also it seems illogical, the timeframe will be extended at every criteria update - progress->date = now; + if (time_t(progress->date + criteria->timeLimit) < now) + { + // Do not reset timer for requirements that are startet manually, also reset their counter, same check as above + if (criteria->raw.field3 != criteria->timedCriteriaMiscId || criteria->requiredType == ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_QUEST) + newValue = 0; + else + { + newValue = 1; + // This is used as start time of the achievement, and hence only updated on fail + progress->date = now; + } + } } will result in the following behaviour for _all_ timed achievements: Achievements can only be completed in timeframe (as it should be) but the visual timer on client side is updated on every count change, because of OpCodes. So, this patch fixes all the timed achievements internally, but the client side cannot use this (yet). An _idea_ for better Opcodes is: (however here is more research needed, and I don't know of these things) diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp index b0bb845..db5ab41 100644 --- a/src/game/AchievementMgr.cpp +++ b/src/game/AchievementMgr.cpp @@ -655,6 +655,7 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement) void AchievementMgr::SendCriteriaUpdate(uint32 id, CriteriaProgress const* progress) { WorldPacket data(SMSG_CRITERIA_UPDATE, 8+4+8); + time_t now = time(NULL); data << uint32(id); // the counter is packed like a packed Guid @@ -662,8 +663,10 @@ void AchievementMgr::SendCriteriaUpdate(uint32 id, CriteriaProgress const* progr data << GetPlayer()->GetPackGUID(); data << uint32(0); - data << uint32(secsToTimeBitFields(progress->date)); - data << uint32(0); // timer 1 + data << uint32(secsToTimeBitFields(now)); // Used to store time of Criteria Updates? + // if not now, then (for normal achievements) dependend on player doing first criteria count, hence 'random' + data << uint32(now - progress->date); // if 0, then resets the timer for timed Achievements, needs more research, + // but syncing server remaining time for timed achievement makes sense data << uint32(0); // timer 2 GetPlayer()->SendDirectMessage(&data); } Edit history: http://paste2.org/p/935564 Initial version http://paste2.org/p/936148 Fix problem if player reloggs while on Manual Started Timer http://paste2.org/p/947434 for Rev 10346
  19. why is this needed? ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL = 34, ACHIEVEMENT_CRITERIA_TYPE_OWN_ITEM = 36, are implemented (and .learn 78381 gave the achievement on clean master 10299)
  20. I would prefer a chess library to be used in kara
  21. Schmoozerd

    Mangos Coding

    version 1) Copy and paste from examples, and if you don't understand something, do www.google.com # C++ <NotUnderstoodClass> version 2) Buy a book version 3) www.google.com # C++ Introduction
  22. The important: Thanks LordJZ for describing Thanks Vladimir for fixing and thanks to Laise for taking the risk of improving the aura system
  23. wow, nice thanks celebrate
  24. with players, or just a test server?
  25. http://getmangos.eu/wiki/Main_Page thanks for your work here
×
×
  • 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