Jump to content

Schmoozerd

Members
  • Posts

    1078
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Schmoozerd

  1. you must be aware what vmaps are: vmaps are a representation of the (static) maps, used for line of sight checks. this has nothing to do with mobs running through walls.
  2. Hi all, -- unfortunately I have atm(before next year) not the time to improve this -- I wrote some changes to MMGens to allow real stacking of MMGens. http://paste2.org/p/1091266 (lines 1 - 377 are only rename stuff because I changed MMaster from stack to deque) -- comments about _this_ patch below -- Features: * better selected return position (depending on the last MMGen with valid position), not the top-most * Support for having stacked MMGens when evading (this result that it is possible to pause a waypoint-movement with adding an Idle MMGen, and this Idle survives combat. This has the idea, that we pause not by changeing a flag, or setting a variable, but to just add a new way of movement (could also be random movement) This also has the effect, that it should be possible to let a mob walk from pointA to pointB, and let him have RandomMovement there (as indeed needed for a few rare occasions (ie Gahz'rilla in ZulFarrak: move out of water, then random movement) * A function to remove unneeded Idle MMGens (=> unpause movement) * as this conflicts heavily with the way EventAI handles CombatMovement, I introduced a new var, to define a "combat MMGen" -- and these are the only ones that are removed on evading This should in the longterm makes it easier to use following MMGens with normal mobs (stacked on ie idle movement) There is a _bug_ with the return-home position, as this one still depends on the first MMGen, and not on the lastone yielding a position, this is noted as TODO point - infact the patch will be conflicting with current src at this point, but with current code this TODO point is just more important before it can be used. (but should still be rather easy to fix) I really would appreciate any feedback, I know these MMGens are hard stuff, but the changes shouldn't be too hard to understand
  3. sparkling is likely related to gm on, dk start quests are a problem wit missing scripts, there are custom around - but well, since ckegg provided some basic-scripts noone really put some effort to write good scripts for this area.
  4. there is currently no system to handle spawning, shared aggro etc in mangos.
  5. use (someMapPointer)->GetGameObject(capturePointGUID); you should know on which map you have your OpenPvp class, so likely store it as "map" if not done already
  6. I suspect he missed the first patch, as I had no conflicts when mergeing. However merged to recent (10728), rough tested, and added also a fullpatch, to spare some time for someone willing to test thanks for willing to test!
  7. What bug does the patch fix? What features does the patch add? - Add a possibility to cast spells as triggered in DB scripts (corresponds datalong & 0x04) For which repository revision was the patch created? 10951 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 I especially intend to use it for spell 31116, in a button-GO script. (Unfortunately I have no proof that this spell is still used with wotlk version in karazhan) But as we want to do more stuff with DB-script, I am sure a trigger possibility is a fair thing. diff --git a/doc/script_commands.txt b/doc/script_commands.txt index b92e12f..bf6b71c 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -157,7 +157,7 @@ spell_scripts 15 SCRIPT_COMMAND_CAST_SPELL source/target cast spell at target/source * datalong = spell id - * datalong2 = 0: s->t 1: s->s 2: t->t 3: t->s + * datalong2 = 0: s->t 1: s->s 2: t->t 3: t->s 4: cast triggered 16 SCRIPT_COMMAND_PLAY_SOUND source = any object, target=any/player * datalong = sound_id diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 2231ef0..5a48b58 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -2397,7 +2397,7 @@ void Map::ScriptsProcess() Unit* spellSource = (Unit*)cmdSource; //TODO: when GO cast implemented, code below must be updated accordingly to also allow GO spell cast - spellSource->CastSpell(spellTarget, step.script->castSpell.spellId, false); + spellSource->CastSpell(spellTarget, step.script->castSpell.spellId, step.script->castSpell.flags & 0x04); break; } diff --git a/src/game/ScriptMgr.cpp b/src/game/ScriptMgr.cpp index 05ae4d4..893e044 100644 --- a/src/game/ScriptMgr.cpp +++ b/src/game/ScriptMgr.cpp @@ -332,7 +332,7 @@ void ScriptMgr::LoadScripts(ScriptMapMap& scripts, const char* tablename) tablename, tmp.castSpell.spellId, tmp.id); continue; } - if (tmp.castSpell.flags & ~0x3) // 2 bits + if (tmp.castSpell.flags & ~0x7) // 3 bits { sLog.outErrorDb("Table `%s` using unknown flags in datalong2 (%u)i n SCRIPT_COMMAND_CAST_SPELL for script id %u", tablename, tmp.castSpell.flags, tmp.id); diff --git a/src/game/ScriptMgr.h b/src/game/ScriptMgr.h index cb6fd97..1ed3543 100644 --- a/src/game/ScriptMgr.h +++ b/src/game/ScriptMgr.h @@ -61,7 +61,7 @@ enum eScriptCommand SCRIPT_COMMAND_CLOSE_DOOR = 12, // source = unit, datalong=db_guid, datalong2=reset_delay SCRIPT_COMMAND_ACTIVATE_OBJECT = 13, // source = unit, target=GO SCRIPT_COMMAND_REMOVE_AURA = 14, // source (datalong2!=0) or target (datalong==0) unit, datalong = spell_id - SCRIPT_COMMAND_CAST_SPELL = 15, // source/target cast spell at target/source (script->datalong2: 0: s->t 1: s->s 2: t->t 3: t->s + SCRIPT_COMMAND_CAST_SPELL = 15, // source/target cast spell at target/source (script->datalong2: 0: s->t 1: s->s 2: t->t 3: t->s 4: cast triggered SCRIPT_COMMAND_PLAY_SOUND = 16, // source = any object, target=any/player, datalong (sound_id), datalong2 (bitmask: 0/1=anyone/target, 0/2=with distance dependent, so 1|2 = 3 is target with distance dependent) SCRIPT_COMMAND_CREATE_ITEM = 17, // source or target must be player, datalong = item entry, datalong2 = amount SCRIPT_COMMAND_DESPAWN_SELF = 18, // source or target must be creature, datalong = despawn delay
  8. how could it, as the entire design depending on achievements is just a hack, because no better idea was at hand?
  9. déjà vu
  10. after ambal has finished his work with his map-rewrite should be more clear then how the Changes must be done main problem with sd2 and openpvp might but be, that 'we' sd2 guys seem to be no pvp guys at all, so there will be some additional man-power be needed to get things done
  11. and the coolest thing of all: patch -p1 <-- applies (~any) git patch patch -p0 <-- applies svn patches So no need to mess around with annoying patch-gui tools, just apply and be happy
  12. What bug does the patch fix? What features does the patch add? - Ensure that SetOrientation actually changes the orientation that is sent in HeartBeat - Ensures that Creature's homeposition is used properly when reaching home For which repository revision was the patch created? 10720 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 Example Creatures, where this makes a difference: Entry: 19726 24436 Originally, I only was concerned about the orientation, and therefore I modified SetOrientation to actually change the orientation that is used in SendHeartBeat. I think it is the right thing, that _if_ we change the orientation server-side, this change will be used on next heartBeat movement-information. But after I was happy with the orientation I noticed that infact a mob after reaching home didn't have to be located _exactly_ (the first example mob), so I changed this to Relocate (which made the previous changes unneeded for _this_ problem), but I think this is reasonable. Infact, if you wouldn't like the use of Relocate, then it is enough to add a SetFacing(data->orientation); at this place diff --git a/src/game/HomeMovementGenerator.cpp b/src/game/HomeMovementGenerator.cpp index ae7d3cd..baff821 100644 --- a/src/game/HomeMovementGenerator.cpp +++ b/src/game/HomeMovementGenerator.cpp @@ -72,9 +72,10 @@ HomeMovementGenerator<Creature>::Update(Creature &owner, const uint32& time_diff // restore orientation of not moving creature at returning to home if (owner.GetDefaultMovementType() == IDLE_MOTION_TYPE) { + // such a mob might need very exact spawning point, hence relocate to spawn-position if (CreatureData const* data = sObjectMgr.GetCreatureData(owner.GetDBTableGUIDLow())) { - owner.SetOrientation(data->orientation); + owner.Relocate(data->posX, data->posY, data->posZ, data->orientation); owner.SendHeartBeat(false); } } diff --git a/src/game/Object.cpp b/src/game/Object.cpp index f238218..107931f 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1157,6 +1157,14 @@ void WorldObject::Relocate(float x, float y, float z) ((Unit*)this)->m_movementInfo.ChangePosition(x, y, z, GetOrientation()); } +void WorldObject::SetOrientation(float orientation) +{ + m_orientation = orientation; + + if(isType(TYPEMASK_UNIT)) + ((Unit*)this)->m_movementInfo.ChangeOrientation(orientation); +} + uint32 WorldObject::GetZoneId() const { return GetBaseMap()->GetZoneId(m_positionX, m_positionY, m_positionZ); diff --git a/src/game/Object.h b/src/game/Object.h index 653b169..1d272e0 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -349,7 +349,7 @@ class MANGOS_DLL_SPEC WorldObject : public Object void Relocate(float x, float y, float z, float orientation); void Relocate(float x, float y, float z); - void SetOrientation(float orientation) { m_orientation = orientation; } + void SetOrientation(float orientation); float GetPositionX( ) const { return m_positionX; } float GetPositionY( ) const { return m_positionY; } diff --git a/src/game/Unit.h b/src/game/Unit.h index 28089ad..073b92e 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -791,6 +791,7 @@ class MovementInfo int8 GetTransportSeat() const { return t_seat; } uint32 GetTransportTime() const { return t_time; } uint32 GetFallTime() const { return fallTime; } + void ChangeOrientation(float o) { pos.o = o; } void ChangePosition(float x, float y, float z, float o) { pos.x = x; pos.y = y; pos.z = z; pos.o = o; } void UpdateTime(uint32 _time) { time = _time; }
  13. Hi guys, I just wrote a tiny script to help me with managing my way I handle my custom 'projects' and how I can easily create full-patches to apply to a custom server or "little patches converting to one big patch" My workstyle: - I never touch master (cause I often need it as reference) - every little project I start in a new branch - I use one branch only for mergeing in my little branches. But sometimes ofc there is a conflict, which ofc I would prefer to solve in the branches only containing the one project, but I didn't yet figure out how I can merge serveral branches with merge-conflict-commits into one branch - if this one branch already has previous conflicted versions of the little-branches merged, so, what I do is, I reset my merge-branch and merge all (conflict-solved) little branches, and therefore I do have this script: #!/bin/sh BRANCHES="dev-branch1 dev-branch2 .." ## Usally this works best to remerge from a clean master echo "reset to master?" read line if [ "$line" = "j" -o "$line" = "y" ] then git reset --hard master fi ## Process the listed branches for i in $BRANCHES do echo "merge $i ?" read line if [ "$line" = "j" -o "$line" = "y" ] then echo "Start mergeing branch $i" git merge "$i" fi if [ "$?" != "0" ] then ## Something went wrong echo "Something went wrong with mergeing $i, Press CTRL+C to abort" read line_ fi done echo "all done" Ofc this might be a stupid way to handle these things, but I don't know (yet) any better - so here you go (p.s. should work in a git-bash on windows, too)
  14. I would put the base geometry of doors in an instance to the terrain-info, but only use them depending the state of the door in the map-object with such a construction we would be able to take care of all DB-spawned GOs, and that should be good enough I think (as doors aren't summoned)
  15. faramir, GOs need a very special treatmeant for LoS checks, likely something !isSpawned || (isDoor && isOpen) || <other exception-gos> to skip the gos from LoS
  16. Hi all this thread is about interaction between the different projects, to solve a few "open" problems, and perhaps improve already doable stuff. Basicly it is about getting a "good" way of doing things (because all things can be done "somehow") First, a few examples, where interaction would be cool: 1) Emissary of Hate: http://www.wowhead.com/npc=25003#comments This mob should spawn, after 6 of the mobs around are killed (_continent_ map) - store & count information of killed mobs around - check on each kill if 6 is exceeded, if it is, spawn emissary - reset counter on corpse-despawn Problem: - Where to store counter, and check if should be summoned? 2) Stitches Event: http://www.wowhead.com/npc=412 Mob should be summoned on Quest-Complete, with a few additions: (_continent_ map) - do not summon a new stitches, while there is already one summoned alive - let a mob (town crier) shout on summoning/ death of stitches Problem: - Where to store counter, and check if should be summoned? - How to "check" the map-status in the DB-script (checking always means to "agree" on some sort of IDs - and as these would be custom that is a problem) 3) Dire Maul - Pusilin Chase http://www.wowhead.com/npc=14354 This NPC should have gossip options, to start a "chase" - There are three parts of the chase, each one has to be activated by gossip-interaction, so the problem is, to only display the item, that corresponds the next part. Problem: - Possible to only move a part of a way, and then pause? - Interaction between progress in chase and gossip. (If done by Creature-Variable, then how to check it in gossip/ set it in DB-scripts, if done by Instance-script, how to check, how to set?) 4) ICC: Forge of Souls - Intro Dialogue This Dialogue should only be started once per Instance, so it needs some kind of storage of already started dialogue Problem: - Where to store? - How to check/ set? A few ideas and their problems: i) Add SD2-"instance-like" support for continent maps Would clearly help a lot in scripting 1) or 2) - 1) could be directly handled with this - 2) would need additional interaction between the map-script and the DB-scripts - - This interaction opens (again) the problem of agreeing on custom IDs ii) Add (custom) world-states in Mangos, which can be used (TODO) by conditions, DB-scripts and SD2 Does solve quite a lot of problems, but would need to somewhere agree on a bunch of custom world-state IDs (which ofc wouldn't be sent to client) - 2) supporting the town-crier on death of Stitches wouldn't be supported. iii) Add an event-based framework, with maps, creatures can "hook" into the event-IDs, events could be thrown on various occasions. This would be extremely powerfull to handle any dynamic aspects in the game, but has the problems, that we would have to agree on _many_ custom event-ids Another problem is, that "checking" events is a bit difficult, as they usally are dynamic, and don't provide static information, but this should be doable. Infact such an event-based framework (especially with scripted maps) would most likely solve nearly any problems of current (335) game design. But, we would need to "somewhere" agree (define) an quite many different event-IDs! A few remarks: - there is no reason at all, that i) is not already supported! - this might infact be quite helpfull to add support for battlegrounds or outdoor pvp - ii) is perhaps the easiest way to interact between the different aspects of a server, and also rather easy to implement - iii) With some sort of clever storing passed events, it would be possible to move most work from SD2 instance-scripts to DB-event-scripts, example opening doors on aggro would only mean adding an action for the On-Aggro-Event ID of the boss to close a corresponding door Conclusion: I think we need someway to store data, that possibly interacts with different parts, and can easily be checked and set. The main problem is in all solutions I can think of, that we would need to agree "somewhere" some IDs that are used for these purposes Any Ideas are welcome, I hope put the problems I see in a clear way
  17. onyxia was moving fine after last fixes...
  18. why do you think these projects keep stucking and won't get accepted.. If a contributor has not more imagination than to port from trinity and _if_ this part in trinity is shit, well, then the patch won't be much better off
  19. add his branch as remote, and his master too, then make a diff between these branches yourself
  20. Was a change in a client patch (3.2 or 3.3) where the reputation reward enchantment items have been added to be usable for twinks
  21. lol, relax - that's a huge bunch of code, so this won't be reviewed in a day..
  22. Am I to understand you that if you buff 30IntScroll, 20IntScroll, that then only the 30IntScroll will have an effect, but when the 30IntScroll aura expires, the effect of the 20IntScroll will become active? I think for now we all would be happy if bool SpellMgr::IsNoStackSpellDueToSpell would return better results
  23. in worst case only a non-existent spell that should be cast as achievement-criteria on encounter-end
  24. I thought of using InstanceString and map, entry, difficulty as key for the dungeonEncounter - however this would make need of massive (boring) rework for sd2.. All ideas with a new table will lack of the main problem - there always will be some event-based encounter which is not completed with killing one npc, so I am sure there needs to be done something on a higher level..
  25. Perhaps I wasn't clear enough - I am concerned about what _should_ happen, and not what is done in these hack implementations around A third and important question: - What else is needed as "communication" between boss encounters and DF?
×
×
  • 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