Jump to content

Chucksta

getMaNGOS Retired Staff
  • Posts

    552
  • Joined

  • Last visited

  • Days Won

    1
  • Donations

    0.00 GBP 

Everything posted by Chucksta

  1. That fix works :-) But we now need to put a check in the above mentioned loop that checks to see if the creature the aura is working on is still alive/exists - in a state to allow for the application of the aura. [B]EDIT:[/B] Forget the above. My system works fine even with the original code!!! No crashes occur, therefore I am unable to prove what works and what does not :(
  2. Rexxar's database entries now PR'd :-) Now to look into Misha (Rexxar's pet bear)!!! [B]Next objective:[/B] [url]http://wowpedia.org/File:Rexxar.jpg?c=1[/url]
  3. PR put in for the new event on all cores (Zero, One, Two, Three, and Four) As soon as I know the code has been added to the core, I'll post a PR for the database with Rexxar's pathing details plus other required database entries (creature_ai_scripts, etc) [B]Still to do:[/B] Misha (bear) following Rexxar [quote=cabfever]Why not doing the scripting of rexxar in LUA since we got the Eluna engine? As I guess, the cpp scripting would be replaced by lua scripts anyway at some time. Anyway, good work! :)[/quote] For me, it's a matter of knowledge of the system, I just happened to work out how the events worked before understanding how the LUA engine worked, and saw that a new event would work well for this and be usable for similar situations :D As soon as I learn how to use the LUA engine, I'm sure I'll make good use of it :)
  4. Good News :-) I now have the EVENT_T_REACHED_WAYPOINT event working, so in my build of the zero server I have the Defias Messenger despawning at the end of the route, then respawning x number of seconds later back at the start of the route. This means we can now have Rexxar, the Defias Messenger and who/what ever else doing as they should in game. I'll tidy up the code, plus update this post with a better write-up of what I have done to resolve this final part. Then submit all to be added to the core and database. I'll work on Misha next, Rexxar's pet. Need to get her to follow, but we can implement the rest, so that we have at least Rexxar on his patrol :D
  5. UPDATE ON PART 2, [B][COLOR="#0000FF"]REXXAR DESPAWNING AT END OF ROUTE[/COLOR][/B] This is how I have put the despawning of Rexxar together, so far: New event: [B]EVENT_T_REACHED_WAYPOINT[/B] (possibly better than EVENT_T_REACHED_DESTINATION, as EVENT_T_REACHED_WAYPOINT makes more sense for any waypoint during a creature's travels) This event is defined in the [B]CreatureEventAI.h[/B] file, thus: enum EventAI_Type { … … EVENT_T_REACHED_WAYPOINT = 31, // positionX, positionY, positionZ, unused } Yes, integers :-( That's the format/type of the fields in the database. So it will have to be a check on the distance from the waypoints, e.g. within 3 of the destination coordinates. Then in the same file we define the parameters the event uses, thus: struct CreatureEventAI_Event { union { // EVENT_T_REACHED_WAYPOINT = 31 struct { int32 positionX; int32 positionY; int32 positionZ; } reached_waypoint; } } Next we have to get the system to use/check this event, this takes us to the [B]CreatureEventAI.cpp[/B] file: bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pActionInvoker, Creature* pAIEventSender /*=NULL*/) { // Check event conditions based on the event type, also reset events switch (event.event_type) { case EVENT_T_REACHED_WAYPOINT: if (!m_creature->reachedWaypoint()) // not coded yet - this function does not exist, as yet { return false; } LOG_PROCESS_EVENT; break; ... ... ... } } Yes, it is supposed to return false there. It returns true at the end of the function. And finally, for now, and in the same file, we get the system to check on the event on a set regular basis (actually every half a second - defined in CreatureEventAI.h - [B]#define EVENT_UPDATE_TIME 500[/B] ) void CreatureEventAI::UpdateAI(const uint32 diff) } // Events that are updated every EVENT_UPDATE_TIME switch ((*i).Event.event_type) { case EVENT_T_REACHED_WAYPOINT: ... ... ... ProcessEvent(*i); break; } } Therefore, to do next, is to code the[B] reachedWaypoint()[/B] function, or similar. That will give us a fully functional Rexxar :) Then it's Misha time!!!!
  6. [SIZE=3]A PR (Pull Request) has now been made that includes this fix on the mangoszero/database repository This thread can now be closed.[/SIZE]
  7. [SIZE=3]A PR (Pull Request) has now been made that includes this fix on the mangoszero/database repository This thread can now be closed.[/SIZE]
  8. [SIZE=3]A PR (Pull Request) has now been made that includes this fix on the mangoszero/database repository This thread can now be closed.[/SIZE]
  9. Weird, in my version of Rel20 the smugglers just will not throw, let alone throw cubes! They just stand still in one place, turning to face my toon as I move him around. I created a new smuggler object in creature_template table, then added entries for it in the creature_ai_scripts and the creature tables. Spawned one and this time it just ran and engage my toon in melee, so obviously totally ignoring the script, which means I am not fully understanding how the creatures are linked with the scripts, except for when using creature_movement (due to my research on Rexxar). I managed to give my smuggler a spear, lol. My last experimentation, I copied the Headhunter Troll entry in the creature table, and used that for my smuggler, even though I could not see any fundamental difference between the entries, but hey ho, you never know. Spawned the smuggler and there she was holding a spear, lol. I had forgotten to change the model, obviously. Anyway, this research is fun :D I always get a buzz from a finished product, but that is short lived. The best part of anything like this, is the fight through the project; problem solving, researching, analyzing, experimentation. searchy, searchy, searchy, learny, learny, learny :D [B]EDIT:[/B] D'oh! The scripts are checked continuously, and the system links the creature to its own scripts by its entry # (located in creature (id) and creature_template (Entry) tables ). The latter I knew, the former I did not. D'oh again. Gonna go for another total and fresh install of the core and database!
  10. I tried this on a few of them, and once aggro'd they just stood in place and turned to face my toon, nothing else. Gonna check Rel19, see if the issue was there too. EDIT: Cannot aggro any of them in Rel19, lol In Rel20, the aggro range seems to be very short (my toon set to just a few levels higher). Gonna see if I can find out what this should be. EDIT: comparing the Smuggler's entry in the [B]creature_ai_scripts[/B] table with an NPC that is working (Frostmane Headhunter) and both are the same, except for the time between throws. Frostmane Headhunter (throwing works as it should) ENTRY: 1123 GUID: 3190 (gotta split, so will look at this some more as and when, unless fixed in the meantime)
  11. My final input re this :D Time to look more into Rexxar! [B][SIZE=4][COLOR="#008000"]FIX INCLUDED - see below [/COLOR][/SIZE][/B] I believe, but could be wrong, that this issue doe exist in the Rel20 version of the core, and that patching up from Rel19 does not actually give you a Rel20, at least not completely. Whether meant or not, I do not know. I COULD BE TOTALLY WRONG! but hey ho, here we go... If you grab the Rel20 version, thus: git clone --recursive git://github.com/mangoszero/server -b Rel20 the file Creature.cpp has faults in it that prevent the mana from showing and regenerating. The code related to this differs to the Rel19 verion of the core. So, 2 problems actually occur: 1) mana is not set for the creature 2) mana does not regenerate (even after applying fix that makes the mana show) [B][SIZE=5][COLOR="#008000"]THE FIXES[/COLOR][/SIZE][/B] [B][SIZE=3]1) mana not showing[/SIZE][/B] file: Creature.cpp function: SelectLevel(const CreatureInfo* cinfo, float percentHealth, float /*percentMana*/) line: 1254 [B][COLOR="#B22222"]code at fault: [/COLOR][/B] // For non regenerating powers set 0 if ((i == POWER_ENERGY || i == POWER_MANA) && !IsRegeneratingPower()) value = 0; [B][COLOR="#800080"]reason:[/COLOR][/B] The purpose of this code is to set the level of the power to 0, which is what should happen for rogue energy and warrior rage, but not for a caster's mana. [B][COLOR="#008000"]proposed fix:[/COLOR][/B] // For non regenerating powers set 0 if ((i == POWER_ENERGY || i == POWER_RAGE) && !IsRegeneratingPower()) value = 0; We are now using the correct constants here, for the rogue type creatures and warrior type creatures :) Swapping POWER_MANA for POWER_RAGE results in mana showing up on the caster. [B][SIZE=3] 2)mana not regenerating[/SIZE][/B] file: Creature.cpp function: RegeneratePower() line: 652 [B][COLOR="#B22222"]code at fault: [/COLOR][/B] if (!IsRegeneratingPower()) return; [B][COLOR="#800080"]reason:[/COLOR][/B] it's incorrectly evaluating the mana state. I don't even think it actually evaluates anything to do with mana, seeing as there is no database entry/field, that I can find, that relates to mana regeneration, only health. Looking at the function IsRegeneratingPower(), this uses the database field RegenerateHealth (creature_template table), via CreatureInfo::RegenerateStats (RegenerateHealth field's contents is stored here). Therefore not using anything mana related, unless I am misunderstanding how this works. [B][COLOR="#008000"]proposed fix: delete it[/COLOR][/B] Deleting this results in the caster's mana regenerating as it should. Looking at Rel19 of the code that deals with regeneration of mana, it has no check on whether or not the creature can regenerate mana. ------------------------------------------------- [B]Seeing as there's no confirmation by others on this fault still occuring, I will go no further than to post the proposed fixes here (above).[/B]
  12. Thanks :) That avatar is the main one I use. The flag represents the county my family are from on my father's side (mother is Italian), although it is rumoured we were originally from Wales, no proof as yet :( . And Chucky is just my namesake, and no reflection of my mental state :D (most people in RL call me Chuck or Chucky) I'm going to add to the list of things to do, the acquisition of the scales of the Tauren male and female models. There must be a record of it out there, somewhere.
  13. Okay, okay, cool... 1.29, 1.39 ... you win.. I ain't messing :D Those figures came out of the top of me noggin. Obviously noggin is fried.
  14. Scale is 0 for most 1.25 for female Tauren 1.35 for male Tauren From what I recall when I looked it this, I thought (at the time), that you could use gender to identify the correct scale. Something like, when populating the world, once you set the scale, you then check for any differences to the default setting, such as IF Tauren && Female THEN Scale = 1.25.
  15. [B][COLOR="#008000"]IF STILL AN ISSUE, POSSIBLE PART FIX INCLUDED (19:31hrs BST - VERY CLOSE TO FULL FIX)[/COLOR][/B] I'm afraid the database update for mana did not fix the issue for me on Rel20 of the core and database. PowerMultiplier / ManaMultiplier neither fixed it. I checked the code and after a lot of commenting out and testing values, I found in the Creatures.cpp file, SetLevel( ) function the following: [B]IN BRIEF:[/B] Check for if the power does not regenerate: should use POWER_RAGE, not POWER_MANA [B]IN DETAIL[/B] // For non regenerating powers set 0 if ((i == POWER_ENERGY || i == POWER_MANA) && !IsRegeneratingPower()) value = 0; This looks like it says to set value to 0, if the power the creature uses is energy like a rogue or mana like a mage. Meaning mana/energy level should start at 0. Wrong, me thinks... mana needs to start at max value, surely! (don't call me... !) Me also thinks that they meant to have used POWER_RAGE, not POWER_MANA So, the code should be: // For non regenerating powers set 0 if ((i == POWER_ENERGY || i == POWER_RAGE) && !IsRegeneratingPower()) value = 0; This code ensures that the power is set to 0 for creatures that use rogue type energy and warrior type rage. This code change resulted in the mana appearing and the Defias Pillager using magic, BUT [B]ISSUE STILL:[/B] The mana does not appear to be regenerating, and it's only starting out at about 45% of the total mana. I'll continue my studies of the system and see if I can figure out for why (no regen and only 45% of total mana at the start)! EDIT: Just adding that health works fine on the Pillager - sets to full amount of health at realm start up and regenerates. EDIT: This code, in the Creature.cpp file, RegeneratePower() function, is evaluating to TRUE for Defias Pillagers, thus preventing the regeneration of their mana: if (!IsRegeneratingPower()) return; If I understand this right, the call to IsRegeneratingPower() is returning FALSE, meaning that it thinks Defias Pllagers do not regen mana. Changing the code to: if (IsRegeneratingPower()) return; Results in the mana regenerating as it should. Of course that means that code reads wrong. Me confuzzled. Damn hayfever addled noggin! Either IsRegeneratingPower() is not working as it should, or there is a database entry that is incorrect for the Defias Pillager. There does not seem to be an entry for mana regeneration, only health (creature_template: RegenerateHealth).
  16. Using the tool MadMax recommended: Cartographe, I have plotted out Rexxar's path and generated the SQL script that will add a path for him to follow in the creature_movement table (TESTED, see link below for images of the path taken). Rexxar will need a script, as he is supposed to despawn at the end of the path, then respawn back at the start, at some point. Also, his pet, Misha (GUID 590005, ENTRY 10204), will need to be scripted to follow Rexxar (despawn, respawn too). THIS CANNOT BE USED UNTIL AT LEAST REXXAR IS SCRIPTED! (OR could add the scripts reversed to the end of these, appropriately numbered (point) then he'll just turn around and walk back, as a temporary solution?) [B][SIZE=3]SQL Script for Rexxar's path[/SIZE][/B] [B]Virus Total check on the file of scripts[/B] [B]Link to images showing the path Rexxar takes:[/B] [url]https://www.getmangos.eu/community-projects/10107-waypoint-mapper-coordinates-sql-script-converter-lua-wpf.html[/url] [B][SIZE=4]EDIT:[/SIZE][/B][B][COLOR="#0000CD"] [SIZE=4]The state of play[/SIZE] -[/COLOR][/B] what needs to be implemented and where we are with each part [B][SIZE=3]1)[/SIZE][/B] [B][COLOR="#008000"]REXXAR's ROUTE[/COLOR][/B] Done - the above SQL script [B][SIZE=3]2)[/SIZE][/B] [B][COLOR="#0000FF"]REXXAR DESPAWNING AT END OF ROUTE[/COLOR][/B] Partly done By using the [B]creature_ai_script[/B] table, with the action: [B]ACTION_T_FORCE_DESPAWN[/B], we can despawn Rexxar. But we need an event that fired when Rexxar reaches his final destination, waypoint: e.g. [B]EVENT_T_REACHED_DESTINATION[/B] parameters: X, Y, Z [B][SIZE=3]3)[/SIZE][/B] [COLOR="#008000"][B]REXXAR RESPAWNING BACK AT START OF ROUTE[/B][/COLOR] Done The [B]creature_template[/B] table has a field called [B]spawntimesecs[/B] This field just needs to have the amount of time entered (seconds, not milliseconds!) that represents the time between despawning (in this case) and respawning. [B][SIZE=3]4)[/SIZE][/B] [COLOR="#FF0000"][B]REXXAR'S PET (Misha the bear) FOLLOWING HIM[/B][/COLOR] Not looked at yet .
  17. Perfectly fine on Rel19 (full mana bars), but on Rel20 the Pilligers have 0 mana. I'll check the database. EDIT: Mana related fields in both Rel19 and Rel20 versions of the database are the same: creature table: curmana 324 creature_template table: ManaMiltiplier 1 MinLevelMana 324 MaxLevelMana 324 I've no idea if any other tables are involved with this, as yet.
  18. Blimey, very long day, but then that's the coder's/programmer's/developer's way. I aim to switch off by 7pm, or I won't be able to sleep. I do start between 5am and 6am (most days), having first gone for a run. I am an early bird. Brain switches off by the evening. Starts shutting down mid-afternoon (Windows Vista implementation, without updates) :D
  19. [quote=Xenithar]This also happens with the orc peons in "The Valley of Trials" in Durotar. Some will be asleep like they're supposed to be. Others will be awake but doing nothing. It as if something half-processed. Not sure what happens with these guys.[/quote] I'll take a toon over there and have a look. If I come up with anything, I'll create a post specifically for it + fix. Free time is the enemy at the mo. As with all/most, no doubt. I swear I do look at the issues in the tracker, but keep on getting side-tacked. Find an issue here and there and just have to have it!
  20. Northshire Peasant walks through a tree then takes a perpetual break Location: Northshire Abbey Coordinates: -8840.38, -271.402, 80.9516 NPC: Northshire Peasant GUID: 80119 Whilst in Northshire (on my own MaNGOS Zero game server), I noticed one of the peasants was doing nothing, other than staring at a tree with a load of logs on its shoulders. It refused to do anything else. I left my toon looking at the spot. Rebooted the server, and went back in game. After a short while I saw the Northshire peasant walk towards its tree, destination of work. It came on to the tree from the opposite side to where it needed to do its chopping. That did not bother the peasant. He just walked straight through it, then turned around and faced the tree and assumed the holding logs on shoulder pose. I acquired the peasants guid (80119), then searched for it in the database. Two locations found that relate to this situation: creature table creature_movement table There was only 1 record in the creature_movement table for this NPC. I searched the table again, this time using the GUID of a peasant who was doing as it should, and noticed it had many entries (records) in the creature_movement table. Obviously each representing a destination within the path/route. So, I reasoned that either our confused peasant has not had its path defined properly, or that it is not supposed to move around, and just stay there chop, chop, chopping. I logged on to a popular private server to see what this NPC did on there, and as I thought, it was just chop, chop, chopping away. Never moving. So, my proposed fix results in the NPC being spawned in place, facing the right way, and in the position to start his life of chop, chop, chopping, and singing dodgy songs about women's clothing. Pointless having him walk there, seeing as the likelyhood of anyone witnessing it, is minute. [SIZE=3]FIX (SQL Script):[/SIZE] creature table UPDATE mangos.creature SET position_x = -8840.38, position_y = -271.402, position_z = 80.9516, orientation = 1.12229, modelid = 308 WHERE guid = 80119; creature_movement table UPDATE mangos.creature_movement SET orientation = 1.12229, model1 = 308 WHERE id = 80119; (BEFORE FIX) IMPATIENT LUMBERJACK CAN'T BE BOTHERED TO WALK AROUND A TREE [IMG]http://chuckyworld.co.uk/MaNGOS/Issues/Database/ImALumberjackAndImNotOkay/NorthshirePeasantWalksThroughATree.jpg[/IMG] (BEFORE FIX) OUR CONFUSED LUMBERJACK [IMG]http://chuckyworld.co.uk/MaNGOS/Issues/Database/ImALumberjackAndImNotOkay/NorthshirePeasantDoesNothing.jpg[/IMG] (AFTER FIX APPLIED) FINALLY, WE HAVE HIM CHOP, CHOP, CHOPPING AWAY :D [IMG]http://chuckyworld.co.uk/MaNGOS/Issues/Database/ImALumberjackAndImNotOkay/NorthshirePeasantHardAtWork.jpg[/IMG]
  21. It'll allow you to set a level up 250 max SEE BOTTOM (oo err) OF THIS POST (FIX) IF YOU CAN'T BE BOTHERED TO READ THIS Not sure if this is an issue, but when I zapped max with that command and put his toon to level 101 he promptly took his slipper to my bottom :o (core crash potential!!!!) Anyway, once the deep heat had done its job, and I could sit down again, I decided to peruse the database, then the code to see how this command is processed. From its database entry in mangos.commands, with a value of "levelup" in the name field, I then searched for this value in the MaNGOS Zero code. That search gave me: file: levelup.cpp function: HandleLevelUp( ... ) Within the body of that function it does have a boundary check on the resulting value of the level up command; the minimum value check works fine: [PHP]int32 newlevel = oldlevel + addlevel; if (newlevel { newlevel = 1; }[/PHP] But the maximum value check does not, unless it is supposed to allow for 255: [PHP] if (newlevel > STRONG_MAX_LEVEL) // hardcoded maximum level { newlevel = STRONG_MAX_LEVEL; }[/PHP] Now, the contant STRONG_MAX_LEVEL has a value of 255 Searching for that constant, I found where it is defined (DBCEnums.h), and below it, is another contant: DEFAULT_MAX_LEVEL, which is set to 60 In my copy of the MaNGOS Zero server source, I replaced the constant STRONG_MAX_LEVEL with the constant DEFAULT_MAX_LEVEL. Rebuilt it, and successfully tested it in game. I could no longer set a level greater than WoW Classic's max of 60. [SIZE=4]FIX:[/SIZE] change the constant from STRONG_MAX_LEVEL to DEFAULT_MAX_LEVEL (2 of these), in the file levelup.cpp, function bool ChatHandler::HandleLevelUpCommand(char* args) OR Set the value assigned to the STRONG_MAX_LEVEL to 60, in the DBCEnums.h file OR none of the above, because that's how it is supposed to work :P
  22. I tried this out yesterday (Rel20), and had no problems at all. I tested sending mail between GMs, Between GMs and players, and between players - 1st time sending mail to the recipient (involved having to creating many new toons). No internal database errors. No errors. All mail went through, incl. attachments.
  23. Tried this on a couple of toons, but was unable to create the issue. All worked fine for me. The toons just materialised at the same place they died. I have no idea if, on death, they are supposed to be transported to the graveyard that is on the island. [B]Note:[/B] I have not applied any updates since installing Rel20 (maybe 4+ days ago)
  24. [quote=Xenithar]I wrote a script to fix this a year or so back. It basically changed all Tauren characters to 1.39 or 1.40 scale, except for Cairne, who was a hair larger. I assume during the rollback this was lost.[/quote] Ah ha, cool. :) It would be interesting to see what exactly you did, as I can't find anywhere that setting a value for scale would only affect one class, as far as Horde Guard is concerned. I might grab the WOTLK database, and take a look at it. See if any light bulbs go off in my head. If anything, at least it will add to my learning of the MaNGOS system :)
  25. Orientation incorrect - Horde Guard is facing a wall Priority about as low as you can go (and some), but might as well post it. MaNGOS: Zero CORE: Rel20 DATABASE: Rel20 Location: Camp Taurajo, The Barrens GUID: 19379 [SIZE=3]PROPOSED FIX:[/SIZE] (SQL SCRIPT - FULLY TESTED) UPDATE mangos.creature SET orientation = 4.936845 WHERE guid = 19379; BEFORE FIX APPLIED [IMG]http://chuckyworld.co.uk/MaNGOS/Issues/Database/HordeGuardFacingTheWall/HordeGuardFacingTheWall.jpg[/IMG] The direction the NPC is facing now, means it is covering the road and the wilderness on its side of the road. I tried to find an image on the web of that area of Camp Taurajo, but could not :-( [SIZE=2]AFTER FIX APPLIED[/SIZE] [IMG]http://chuckyworld.co.uk/MaNGOS/Issues/Database/HordeGuardFacingTheWall/HordeGuardFacingTheRightWay.jpg[/IMG]
×
×
  • 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