Jump to content

ChanF07

Members
  • Posts

    42
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by ChanF07

  1. In 2.4.3 the client can be fooled into not accepting the restriction, but in 3.0.x and above the restriction is definitely enforced. I think some of the old tricks of spoofing race in the client server communications won't work. Lordsab: If its a spell, the server handles it... and from memory the scorge invasion event just sets the player to a different faction altogether (temporarily) that's hostile to both horde and alliance. The scarlet crusade ashbringer event is a entire instance script; if you plan to do that to all the mobs you have some serious performance issues.
  2. To make Death Coil work, someone has to code an exception for the spells (52375, 49892-49895) The spell has an Attack Power coefficient of 0.15 (On a side note should someone create a generalized modification for death knights so their abilities scale with ap?) All the spells proc a SPELL_EFFECT DUMMY which is currently not catched (Ithink) Main problem for spell is that this spell does damage against unfriendly targets but does healing on friendly undead targets. I have an idea on how to code the friend or foe selection but what I lack is some way to convert that result into damage or healing. so far I plan on using something like this: if (unitTarget && unitTarget->GetTypeId() == TYPEID_UNIT && unitTarget->IsHostileTo(m_caster)) to determine if a target is hostile and a variation of it to determine if a target is friendly. Also on a related note does anyone know how to find the Spellfamily and spellfamily flags of spells?
  3. git checkout -b yourbranchname shaID (branchname is mangos-0.12 ithink) then git merge (branch name of anticheat branch) and then git apply path/to/patch (for arena patch) May need adjusting in order of commands. If you need to resolve stuff use "git diff" to see conflicts
  4. Luckily that's been shoved off to the Raise Ally spell. Currently the check to use corpse dust or a humanoid corpse isn't in the code yet, since I want to get the bare spell working at first. The requirement check can be probably added later (I'm assuming that the code follows a linear execution path). Thank you for your suggestion on how to do the humanoid corpse part. I tried with talent and no talent. In theory the code above should, if I didn't screw up, cast a ghoul when character has talent or fail and do nothing without the talent since the exception for handling the two minute guardian hasn't been done yet . I have a strange feeling that my GetId() check is failing or doing something weird or the spell is actually a spell not a aura. All help is really appreciated.
  5. I tested this code that came up with but I'm not sure why it didn't work and redirect the cast of the spell to the right spell. It did not generate compile errors but I'm not sure I'm doing it right. @@ -4833,10 +4833,28 @@ void Spell::EffectScriptEffect(uint32 effIndex) + // Summon Ghoul + case 46584: + { + // Get list of dummy auras + Unit::AuraList const& auraDummy = m_caster->GetAurasByType(SPELL_AURA_DUMMY); + for(Unit::AuraList::const_iterator itr = auraDummy.begin(); itr != auraDummy.end(); ++itr) + { + // Look for Master of Ghouls talent dummy spell (52143) + if((*itr)->GetId() == 52143) + // Player has talent; cast pet ghoul spell + m_caster->CastSpell(unitTarget, 52150, false); + else + // Player has not got talent; cast time limited ghoul spell + m_caster->CastSpell(unitTarget, 46585, false); + break; + } + } + Feedback and hole poking of my code would be very appreciated. Problems 1) and 1a) still apply I need some help in making sure I haven't screwed up
  6. First you need to lookup what a spell does. In the example of Haunt you have 3 effects; The first effect does damage via a certain school of magic (Shadow in this case) so it is handled by Spell::EffectSchoolDMG in SpellEffects.cpp. Under that heading there is a list of various exceptions for spell with different ways of calculating damage and at the end there is if(damage >= 0) m_damage+= damage; which turns the spell damage value in the dbcs (not sure about this but its the logical place to store such data) in to damage applied to the target. Next there is a dummy aura for the heal. These are handled under Spell::EffectDummy; In this case there is no handler for this spell but if someone were to code an exception it would go in there and if you couldn't find out the spell family, you could use the SPELLFAMILY_GENERIC and catch the case by the spellid. I'm not sure on how to code the count damage, so someone else may need to help here. Last is the the +shadow damage from dots. This calls the Spell::EffectApplyAura which applies the aura onto the target. The real effect comes when that aura is handled in SpellAura.cpp; in this case the aur is 271 and according the list at the start &Aura::HandleNoImmediateEffect, //271 SPELL_AURA_MOD_DAMAGE_FROM_CASTER implemented in Unit::SpellDamageBonus so the effect should be handled by AuraList const& mOwnerTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_FROM_CASTER); for(AuraList::const_iterator i = mOwnerTaken.begin(); i != mOwnerTaken.end(); ++i) if( (*i)->GetCasterGUID() == GetGUID() && (*i)->isAffectedOnSpell(spellProto)) TakenTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f; Not sure if this works, but in theory it should and damage should go up. All spell effects should be handled in SpellEfects.cpp; for futue use wowhead often gives you effect to lookup, usually requiring the spell effect prefix. Also note that spaces are converted into "_" in the list which helps when searching or browsing for the effect. Hopefully I've been of some help and haven't lost you... Feel free to ask more questions if you have any.
  7. Some code; most likely wrong...etc Just and idea of how to implement. (I have no prior coding experience; so please don't use this code!) //In SpellEffects.cpp //Under void Spell::EffectScriptEffect(uint32 effIndex) probably under SPELLFAMILY_GENERIC somewhere case 46584: { // Get list of dummy auras Unit::AuraList const& auraDummy = m_caster->GetAurasByType(SPELL_AURA_DUMMY); for(Unit::AuraList::const_iterator itr = auraDummy.begin(); itr != auraDummy.end(); ++itr) { // Look for Master of Ghouls talent dummy spell (52143) if((*itr)->GetSpellProto()->SpellId == 52143); // Player has talent; cast pet ghoul spell cast 52150 return; // Player has not got talent; cast time limited ghoul spell cast 46585 return; } } I am trying to place an exception so that when spell 46584 (Player Raise Dead spell) is cast, a check for whether the talent Master of Ghouls is active and if so cast 52150, else cast 46585. Problems I see in code and need help with: 1) Is this the right way to check for if the talent is active? If so... 1a) Is there any way to check for the aura without iterating all the dummy auras that could be on the player at the time? 1GetId() seems to be what I'm looking for Feel free to point out errors in my code because I can only learn from this exercise...
  8. Currently the Death Knight spells Raise Dead, Raise Ally and Army of the Dead do not work. After a bit of tinkering and browsing I have, so far, sort of found how Raise Dead works. (NB Source list for spell info comes at end of post) Initially the spell Raise Dead that a player would have access to is spell 46584. This spell has two effects: First is to call SPELL_EFFECT_SCRIPT_EFFECT (77) with the value of 46585. The effect here, I guess, is to cast spell 46585, which happens to be a spell that summons a 2 minute long duration ghoul, with the spell effect no. 28 (SPELL_EFFECT_SUMMON). It also passes on a summon type of 829, which the core does not recognize and prints the error "Unrecognized summon type 829". This case, ithink, needs to be handled within somewhere in Pet.cpp in a similar fashion to a guardian; the player does not have control over the ghoul and acts much like a guardian. Secondly the spell calls SPELL_EFFECT_DUMMY (3) with a value of 52150. Spell 52150, is a spell to summon a pet ghoul, without a time limit. This condition should only be achieved while the talent Master of Ghouls is active. The core summons the pet fine in this case currently, as a normal pet. In both cases the same ghoul (id= 26125) is summoned as a pet. My trouble is how does the talent spell (52143) switch spell 46584 into casting 52150 instead? The talent spell calls a SPELL_EFFECT_DUMMY, so could we write an dummy spell exception to change 46584 to cast 52150? The other problem with ghouls is how do we implement the summoning cost of 1 Corpse dust or a dead humanoid corpse? I need to do more browsing to find out if the player has to target a corpse to use the corpse instead of the corpse dust (will do later). Anyway a big thanks to the developers for coding mangos. Also thanks in advance to any help. I am trying to learn to code, but am not confident. Sources Raise Dead (46584) - http://www.wowhead.com/?spell=46584 - Player spell Raise Dead (46585) - http://www.wowhead.com/?spell=46585 - 2 minute ghoul spell Raise Dead (52150) - http://www.wowhead.com/?spell=52150 - Pet summon spell Master of Ghouls (52143) - http://www.wowhead.com/?spell=52143 - Talent that enables Pet Ghoul I'll try and have a look at Raise Ally and Shadow of Death, which I suspect may be similar spells with just different targets, later.
  9. There was a project called mangchat that implemented IRC chat channels to sync with the in game chat. The project page is still up at http://mangchat.visualdreams-its.com/index.php/Main_Page ,but I don't think the project is active anymore. However the source is still available on the filebeam mirrors on that page so you could take a look how the send/recieve mechanism works. I vaguely remember that there was whisper from irc to game function somewhere in there, but I may be wrong. Monster whispers are noticeable in that they cannot be replied to and is distinguishable in that the npc name is used instead. An example of a mob whisper http://www.wowwiki.com/Khadgar%27s_Servant .
  10. Not too sure but I guess the coords for x, y and z are per continent basis. Indoor areas are possibly an exception if the area is instanced or underground.
  11. I think so but you may run into trouble if your database structure has not changed enough for the sql. As in most cases, if no one says anything, go and try it but keep the database backups handy. Also if it doesn't work go make a local temp git repository to the latest version and have a look at the sql file changes for the arena (I'm fairly sure they're well labelled with an arena tag in the name). Also as an aside, what sort of stability issues did you run into?
  12. Either stick a portal at the start locations of each race (GM using .spawn could do this after you make the custom GO in the db. There were tutorials for this...not sure if they got lost in the forum crashes). I can't really figure out how to make the custom tele without portal... there maybe some code in player.cpp that could help, not sure through.
  13. In player.cpp (line 487 in mangos/origin 6898) PlayerInfo const* info = objmgr.GetPlayerInfo(race, class_); if(!info) { sLog.outError("Player have incorrect race/class pair. Can't be loaded."); return false; } If you could put some code in here to check for a class and then return false you can stop a character from being loaded. In CharacterHandler.cpp (line 236 in mangos/origin 6898) // prevent character creating Expansion class without Expansion account // TODO: use possible addon field in ChrClassesEntry in next dbc version if (Expansion() < 2 && class_ == CLASS_DEATH_KNIGHT) { data << (uint8)CHAR_CREATE_EXPANSION; sLog.outError("Not Expansion 2 account:[%d] but tried to Create character with expansion 2 class (%u)",GetAccountId(),class_); SendPacket( &data ); return; } Make this ALWAYS return false to stop death knights from being made. Also modify if (Expansion() < 2 && class_ == CLASS_DEATH_KNIGHT) to have <3 or <=2 so that wotlk is covered like this ithink: if (Expansion() < 3 && class_ == CLASS_DEATH_KNIGHT)
  14. To change the NPC's and player start gear is most likely simple database editing. The level 70 at start can be set in the mangos.config file. The give/ take gold on death would need a bit of custom code in the handler for on player death with the pvp flag set on; probably look in world.cpp or player.cpp ithink. As for making a patch for this, there exists none atm, and it would be fairly easy to do the database bit. The money modification on pvp loss/ win would be the only thing you'd need a patch for and it would most likely not be included with mangos since its custom content. Further reading: Explanation of the starting gear table: http://wiki.udbforums.org/index.php/Playercreateinfo_item Setting a NPC to sell stuff: http://wiki.udbforums.org/index.php/Npc_vendor Table that contains other data for npcs: http://wiki.udbforums.org/index.php/Creature_template#entry
  15. Mea culpa! Long time no read... Thanks for the heads up about that subhuman_bob!
  16. EDIT: Read below. From what I read of code you still have to find the creature before you can tame it. But everything else should go fine. Autoleveled ithink from what I see in code.
  17. You can still fall through terrain if you use charge, blink or other movement shifting abilities. There have been attempts and work done on trying to fix this but it hasn't come to fruition yet.
×
×
  • 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