Jump to content

Schmoozerd

Members
  • Posts

    1078
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Schmoozerd

  1. don't know much about the db revs, but I suggest you to read http://udb.no-ip.org/index.php/topic,12422.0.html
  2. mangos 0.12 branch was moved to mangos/one.git change your remotes in git accordingly, and use latest sd2 with tbc patch
  3. start with giving your thoughts what should happen when: http://www.wowhead.com/spell=58678 (casted by boss, periodic tick spell) target CHAIN_DAMAGE triggers 58941 (ScriptEffect) target SELF this spell should trigger some damage spell(s) by chance, approximately 30% - also triggers three times Dummy spells 58689, 58692 (target TARGET_DYNAMIC_OBJECT_COORDINATES) likely left/ right hand Damage spells 58695, 58696 (or heroic 60883, 60884) (target TARGET_DYNAMIC_OBJECT_COORDINATES, AoE) I don't know how the TARGET_DYN_OB_COORDs are working, but either this means that this takes the coords of some other npc, or this is something like 3 yards below and 4 yards behind (don't know) What you can do to get some good guess what these spells are actually doing, try to cast them to see what their visual effects are, and get them in relation to what is supposed to happen.
  4. a = a_{N_0}a_{N_0+1}..a_0 , a_1, a_2, .... (p-adic) = \\sum_[n=-N_0}^{\\infinity} \\frac{a_n}{p^n}
  5. there is currently no way We need to script "SetInCombatWithZone" manually for every boss we want this behaviour. This patch is about moving this work to mangos
  6. Hyjal, Jaina, thrall BT: Akama, maiev? (at illidan encounter) SWP - there is much with events, don't know about them some of the wotlk instances have also event mobs
  7. recompile your core and use the newer core version. or reuse a backup from before applying all these core-updates - you surely have updated, haven't you? - and update only to the version you want OT: I suggest to install a few of the udb-updatepacks as well.
  8. What bug does the patch fix? What features does the patch add? Add automatic SetInCombatWithZone for Raidbosses, either - depending on check of InstanceData (v1, 2, 3) or - depending on creature_template.flags_extra (v4) For which repository revision was the patch created? 10986 - v4 on 11030 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 Basic Idea: When a RaidBoss enters combat, he uses SetInCombatWithZone. To allow exceptions of this general rule, I added a new virtual function to InstanceData, such that the scripting library is able to control this behaviour. Here are four different ways - they have different default behaviour. 1) The 'agressive way: http://paste2.org/p/1184405 (default: raid bosses go into combat with zone) This way provides this feature also without scripting library, but needs to adjust (very reasonable I think) the SetInCombatWithZone function to prevent unexpected behaviour. 2) A moderate way: http://paste2.org/p/1184408 (default: raid bosses go into combat with zone, _if_ the map is scripted) This way needs rather fast exceptions for bosses that shouldn't behave this way, however it can be changed to a better default behaviour, if we add for this case the change in SetInCombatWithZone(), too 3) A conservative way: http://paste2.org/p/1184411 (default: raid bosses go into combat with zone, _if_ the map is scripted AND the script returns true) This way must explicit add a raid to allow this behaviour, hence should be bug-free "out of the box" (when scripted), however this would require (pointless) return true for the instances.. I personally think way 1) is the best choice, because this is the generic behaviour that should be modelled, also if this _might_ have a bug temporarily(until scripted proper) for older instances. However I looked over raids and their bosses and didn't see any possible bug for this solution. -- 4) New version, using some flags_extra (thanks to NF for the idea) diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index a7d62a9..d37e575 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1985,7 +1985,7 @@ void Creature::SetInCombatWithZone() if (pPlayer->isGameMaster()) continue; - if (pPlayer->isAlive()) + if (pPlayer->isAlive() && !IsFriendlyTo(pPlayer)) { pPlayer->SetInCombatWith(this); AddThreat(pPlayer); diff --git a/src/game/Creature.h b/src/game/Creature.h index 95076db..563ccb5 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -52,6 +52,7 @@ enum CreatureFlagsExtra CREATURE_FLAG_EXTRA_NO_XP_AT_KILL = 0x00000040, // creature kill not provide XP CREATURE_FLAG_EXTRA_INVISIBLE = 0x00000080, // creature is always invisible for player (mostly trigger creatures) CREATURE_FLAG_EXTRA_NOT_TAUNTABLE = 0x00000100, // creature is immune to taunt auras and effect attack me + CREATURE_FLAG_EXTRA_AGGRO_ZONE = 0x00000200, // creature sets itself in combat with zone on aggro }; // GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push,N), also any gcc version not support it at some platform diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3a42cbf..bf04237 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7711,11 +7711,17 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy) if (getStandState() == UNIT_STAND_STATE_CUSTOM) SetStandState(UNIT_STAND_STATE_STAND); - if (((Creature*)this)->AI()) - ((Creature*)this)->AI()->EnterCombat(enemy); + Creature* pCreature = (Creature*)this; + + if (pCreature->AI()) + pCreature->AI()->EnterCombat(enemy); + + // Some bosses are set into combat with zone + if (GetMap()->IsDungeon() && pCreature->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_AGGRO_ZONE) + pCreature->SetInCombatWithZone(); if (InstanceData* mapInstance = GetInstanceData()) - mapInstance->OnCreatureEnterCombat((Creature*)this); + mapInstance->OnCreatureEnterCombat(pCreature); } } Testing ie MoltenCore with: UPDATE creature_template SET flags_extra = flags_extra | 512 WHERE entry IN (12098, 12056, 12057, 12264, 12118, 11982, 11988, 12259, 12018);
  9. hmm, is it possible that the left and right hand are vehicles, and hence this first spell should trigger the vehicle npcs to cast the next spells?
  10. Registered: 2008-07-30 and still not found www.scriptdev2.com ?
  11. ? no problems with github for me
  12. updated to recentish changes in DBScripts system
  13. hmm, why not load (and reload by same command) with the rest of spell_threat table? should make some parts easier of the code, you simyple push to the different map the values for the entries; Speeding up the whole problem should be possible by setting an invalid (perhaps -1.0f - might also be 0 possible) as default for the table, and only push spells with not -1 values to the map. (Just an idea) Also I think you can remove the wrapper in unit-class, such that your new damage calculation will be: damage * sSpellMgr.GetSpellThreatMultiplier(spellProto->Id);
  14. Happy new year to all here
  15. in case you want to follow such an idea more closely: In wintergrasp there must be a book with pagetext counting the wins for alliance and horde. So this might be a good point to take a sniff if in such a case the SendTexts opcodes are sent with special arguments which are used there. As such information suggests used world-states I think it might be possible that this is a more advanced place to go, This also reminds me to some points we talked about some SD2-instance like scripts for normal maps which might give a good frontend to store and load such datas
  16. yes, my answer was directed rather at the main topic (summon GOs manually) about your very problem: I currently have no database available, but: - 182592 is type 6 (trap)? - is 182592 linked with another GO as linked trap?
  17. it is only usefull for people not willing to research proper behaviour.. GOs that are spawned at the same place always need to be spawned in despawned state, other GOs are used with spells. And if you encounter a GO that should be spawned at dynamic places, and there is no spell for spawning this GO, then you have an example where a manual summon GO function is needed. Good luck searching
  18. Edit: IF I understand it correctly, type == 2 <=> at least one spell is a profession spell, so then we should use as fix something like data << uint32(std::max(cSpells ? cSpells->trainerType : 0, tSpells ? tSpells->trainerType : 0)); (my first idea was likely wrong)
  19. no good idea, because you need to think of the case of some multi-npc encounters. also for the rare case of a summoned boss you are hopeless to get the state in reload cases. (no corpse -> no respawntimer which you could check)
  20. no kiddin' -- what crash? would be helpfull if you would post the needed stuff.. Crash-log Reproducing observation
  21. hmm note about my idea using sd2-instance string: will become difficult, as the order of the bosses is unfortunately not fix between difficulties. ie sethekk normal: syth, ikiss sethekk hero syth, anzu, ikiss
  22. There is none. Look at some of the recent spell-fixes to get an idea which parts of the code _might_ have some impact on the problem you face.
  23. I really doubt that these are many cases This is like evading evading timers, generic ideas about target selecting depending on reachability - basicly stuff that has lots of time to be taken care of! ie the example with the bat is quite easy: this boss most likely will need a flying flag for the point when he is flying down, and that's the only thing you need to check in your code If this flag isn't used (yet) in the script, then I am sure that someday someone will fill in a bugreport at sd2 such that it get's the needed attention
×
×
  • 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