Jump to content

ChanF07

Members
  • Posts

    42
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by ChanF07

  1. Not DB or core related (ithink) Needs a SD2 script for the talk options to work and for the mount to be applied.
  2. ChanF07

    MMaps Redux

    7zip can be extracted with the tool from here for Windows. For linux check your distribution package manager (off the top of my head Ubuntu has one in the software picker)
  3. The wild threat wackyness isn't a problem of this patch. Rather it's more likely the threat coefficients for the spells are wrong; if you know the spell id and the threat coefficient from somewhere try tinkering with the spell_threat table in the mangos database.
  4. From what I see this patch just puts another table to hold mails that you can send. To make an interface means a php script that puts in some values or etc (I don't have said script). I wouldn't use the patch since it'd be too easy to put a bad query in and screw the server or slow it down just by the update calls.
  5. "SQL ERROR: MySQL server has gone away" means that the mangosd can't talk to the SQL server; most likely the mysql process crashed out or something. Probably unrealted to this patch, since this deals with the core.
  6. Assuming you coefficient is right the SQL modification would probably look something like: -- Updating coefficients for Lifebloom Final Heal DELETE FROM `spell_bonus_data` WHERE `entry` IN (`33778`); INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `comments`) VALUES (`33778`, `0.646`, `0`, `0`, `Druid - Lifebloom Final Heal`) On a side note someone should post a patch in the under review section with all the code etc so the patch isn't forgotten.
  7. So you mean something like <ignore since proper one is in first post now> For the other part do we just drop the target line altogether? Anyways thanks for your feedback.
  8. Not too sure about source (http://forums.worldofwarcraft.com/thread.html?topicId=17367606461&sid=1) but Which would indicate indeed last stand is autocastable.
  9. Reminds me is there a less hacky way to check whether the talent is active? Because the talent, from memory doesn't list cause an searchable dummy aura for the normal spell icon/familyflags check. Also if you still read this Vladimir any idea on why the initial code's !isAlive fails? Also previous post edited; not sure if less hacky but hopefully better.
  10. Since the Ghoul pet is only permanent if talent is known; more checks are need most likely and a check within the cast code is needed should the player respec and unlearn talent. What the dummy handle code would look like case SPELLFAMILY_DEATHKNIGHT: { switch (m_spellInfo->Id) // Summon Ghoul case 46584: { bool ptype =(m_caster)->HasSpell(52143); bool level = if( unitTarget->getLevel() > MaNGOS::XP::GetGrayLevel(m_caster->getLevel())); bool humanoid = if( unitTarget->GetCreatureType() == CREATURE_TYPE_HUMANOID); bool item = if((Player*)m_caster)->HasItemCount(37201,1)); bool dead = if(unitTarget->!isAlive()); int spell0 = 0; if(level=false) { if(item=true) return; else break; return; if(dead=false) { if(item=true) return; else break; return; if(humanoid = false) { if(item=true) return; else break; return; if(ptype=false) { spell0 =52150 } else { spell0 = 46585 } (m_caster)->CastSpell(m_caster,spell0 ,false); } return; Ofc none of this code is check for consistency, optimisation, style and full working; its just to give an rough outline of what I think can be done as a temp patch. Should someone (or someday after more learning, me) be able to do the get random target check, it would be a simple matter of setting that target as unitTarget or some other pointer for this code to work. Also I don't have access to the latest source atm so I can't help code, test, write code better or see the cannabailse code (if someone reposts the relevent sections I may be able to guesstimate some working code).
  11. I guess the latter option would be a better idea, as long its was a general check for dead creatures nearby. Come to think of it doesn't SD2 have functionality like this already? Maybe a pointer could be found there...
  12. From memory unitTarget->GetTypeId() == TYPEID_PLAYER isn't needed since Raise Ally exists for that condition. (Not mentioning that for friendly players they have control of ghoul) Oh yeah the bit about the lack of xp and etc; just define the temp ghoul as a guardian and that handles that (petstats are handled by db). Btw all the sLog.outError calls are debugs atm right? cause the console would light up fast and make it harder to trawl through the logs. About the isDead check, it maybe that its has to be separated from the other checks due to some weird bug (or feature is design); from memory the only way isDead/Alive called is usually as a separate check like; if(xyz=00100110) { if(unitTarget=isDead) { break; } ...etc Either that it was designed like this or we could be overloading the if() statement (no idea on this) In reality it probably would be less hacky to make an operator that uses the CreatureLastSearcher, specified for a dead target then apply humanoid/xp filter. But this sorta too darn complex for me.
  13. Just so happens you pick a difficult one; Turns out that the reduction has to be applied to pets via Apply Aura: Flat modifier, which I don't think is supported yet Although I guess, since many pet affecting talents use this call with the value of 8 maybe someone could code to fix it. In SpellAura.cpp this bit breaks the chain, since the code shown will break the function: void Aura::HandleAddModifier(bool apply, bool Real) { if(m_target->GetTypeId() != TYPEID_PLAYER || !Real) return; So until someone modifies/ tries to fix this well we can't do anything. NB: I'm not sure if anyone tried to patch out the pet aura fully, I'm not sure if there is another path to cast/ add auras to pets.
  14. I'm a little too busy with uni starting to work more on this atm. I may have a solution to the isDead() check problem but that takes time to debug and implement so I can't do that.
  15. The reason we have to put the SpellFamilyMask in the table manually is that, the spell affected are not targeted by the spell thus the query is there to add the target. Mark of the Wild is working fine... and you aren't very specific on what is broken, so I can't show an example Also a correction to what the database wiki says uint32 SpellFamilyName; // 211 m_spellClassSet uint64 SpellFamilyFlags; // 212-213 m_spellClassMask NOTE: size is 12 bytes!!! uint32 SpellFamilyFlags2; // 214 addition to m_spellClassMask for 33876 only has a 1024 in any of the values; I'm guessing that what happens is that there are multiple masks that need to be affected and they have been added to make a big mask. Not sure on how the full mask is made but because you have two fields to span for each spell, you may have some weird byte order system I don't know about or the hex value is supposed to be split between the fields with some multiplier. (To me it appears that field 213 has some crazy multiplier on it) Also to clarify I was wrong about the mask being on the spell 16999
  16. The spell you should be looking at is 16999 since that is the effect spell, which affects 33876. Note for talents and other modifying spells they are separate from the spell that is affected (ie. talent xyz increases damage of twa, talent xyz is a spell that modifies twa to do more damage). http://www.wowhead.com/?spell=16999 for example lists that the spell 16999 applies auras that modifiers; what spell_affect does is to say what spell modifies what.
  17. Hrm it could be that when you float z, the tele location is actually slightly below the terrain thus you can't move. Hacky solution would be to do a z + 1(or etc) as the tele coords. Spell family is SPELLFAMILY_DEATHKNIGHT, which ithink doesn't exist in master branch yet so you'll have to create it by addding a case entry after the switch(spellfamily). Also view =! help due to people not sure how to help or don't have time to help.
  18. I have problem in how the values in column 212 and 213 in spell.dbc are transformed into SpellFamilyFlags. I know it has something to do with dec->hex shifting but I don't understand the LL at the end of some flags and why there are 0's before some and not others. For example, Death Coil has the entries 8192, 0 in rows 212 and 213 respectively (I'll stick to this format for values) and a SpellFamilyFlags 0x002000LL. I know that 8192 is 2000 in hex; but how does the 00 fit in and are the LL just place holders to indicate the lower byte? Another example would be Shaman Rockbiter Weapon; It has a SpellFamilyFlags of 0x400000 and values in the dbc of 4194304,0. 4194304 in hex is 400000 but how come no 00 are fitted into the flags? And does the LL need to be there to indicate the lower byte, if indeed it indicates the lower byte? Thanks for any help!
  19. Pet names are chosen from the "pet_name_generation" table which is a DB sql. Thanks for the help through.
  20. crackm GridUnload = 0 should load all the maps into ram.
  21. Restructured code to avoid if/else issue. Also lot more easy to read but has duplication... case SPELLFAMILY_DEATHKNIGHT: { switch(m_spellInfo->Id) { // Summon Ghoul case 46584: { // Corpse or dust check // See if player is targeting a dead, humanoid, =plevel-3 target if( [b]unitTarget->isDead()[/b] && unitTarget->GetCreatureType()==CREATURE_TYPE_HUMANOID && unitTarget->getLevel() >= m_caster->getLevel()-3 ) { // Look for Master of Ghouls talent dummy spell (52143) if( m_caster->GetTypeId()==TYPEID_PLAYER && ((Player*)m_caster)->HasSpell(52143) ) { // Player has talent; cast pet ghoul spell m_caster->CastSpell(m_caster, 52150, false); } else { // Player has not got talent; cast time limited ghoul spell m_caster->CastSpell(m_caster, 46585, false); } } else { //See if player has [Corpse Dust]; if yes -1 and continue, if no reset and break. (Note Dust removed after cast) if(((Player*)m_caster)->HasItemCount(37201,1)) { ((Player*)m_caster)->DestroyItemCount(37201,1,true); // Look for Master of Ghouls talent dummy spell (52143) if( m_caster->GetTypeId()==TYPEID_PLAYER && ((Player*)m_caster)->HasSpell(52143) ) { // Player has talent; cast pet ghoul spell m_caster->CastSpell(m_caster, 52150, false); ((Player*)m_caster)->DestroyItemCount(37201,1,true); } else { // Player has not got talent; cast time limited ghoul spell m_caster->CastSpell(m_caster, 46585, false); ((Player*)m_caster)->DestroyItemCount(37201,1,true); } } else m_caster->CastStop(); return; } return; } } } The code in bold isn't working; for some mysterious reason the isDead check come back negative when targeting a corpse...
  22. Bonus code @@ -3197,10 +3197,11 @@ void Spell::EffectSummonType(uint32 i) case SUMMON_TYPE_GUARDIAN: case SUMMON_TYPE_POSESSED: case SUMMON_TYPE_POSESSED2: case SUMMON_TYPE_FORCE_OF_NATURE: case SUMMON_TYPE_GUARDIAN2: + case SUMMON_TYPE_GHOUL: EffectSummonGuardian(i); break; case SUMMON_TYPE_WILD: EffectSummonWild(i); break; @@ -2082,10 +2082,11 @@ enum SummonType SUMMON_TYPE_CRITTER3 = 307, SUMMON_TYPE_UNKNOWN5 = 409, SUMMON_TYPE_UNKNOWN2 = 427, SUMMON_TYPE_POSESSED2 = 428, SUMMON_TYPE_FORCE_OF_NATURE = 669, + SUMMON_TYPE_GHOUL = 829, SUMMON_TYPE_GUARDIAN2 = 1161 }; enum ResponseCodes { This adds support for the temporary 2 minute ghoul summon.
  23. I finally tweaked the patch to work! Not... Features still missing: -[bug] Will consume a corpse dust even when a corpse is available -Only corpses that yield experience/honor can be used by spell -Should also remove corpse after use case SPELLFAMILY_DEATHKNIGHT: { switch(m_spellInfo->Id) { // Summon Ghoul case 46584: { // Corpse or dust check if( unitTarget && unitTarget->isDead() && unitTarget->GetCreatureType()==CREATURE_TYPE_HUMANOID ) m_caster->AttackStop(); else { if(((Player*)m_caster)->HasItemCount(37201,1)) ((Player*)m_caster)->DestroyItemCount(37201,1,true); } // Look for Master of Ghouls talent dummy spell (52143) if( m_caster->GetTypeId()==TYPEID_PLAYER && ((Player*)m_caster)->HasSpell(52143) ) // Player has talent; cast pet ghoul spell m_caster->CastSpell(m_caster, 52150, false); else // Player has not got talent; cast time limited ghoul spell m_caster->CastSpell(m_caster, 46585, false); return; } } } I'd would have preferred a neater way to do the negative instead of the "m_caster->AttackStop();" (NB doing a negative if clause is not going to work) Also I was under the impression that in a if/else clause it was either the first or second being executed not both which is somehow occurring in this example... or is its some special caste of no nesting past a certain depth?
  24. I figured out why the summon doesn't work; for the path to the talent to work the talent must be on the player and for some reason the talent doesn't stay active after being cast... It instead has a spell effect dummy and just dies off Must code a way for talent to stay active. Either that or find a way to see if player knows spell 52143. Other problem is that the summon spell need a target so I have to pass m_caster instead of uintTarget. Spell 48289 is a dummy spell that requires corpse dust to be cast solving the dust requirement. // Summon Ghoul case 46584: { // Corpse or dust check if( unitTarget && unitTarget->isDead() && unitTarget->GetCreatureType()==CREATURE_TYPE_HUMANOID ) return; else m_caster->CastSpell(m_caster,48289,false); return; if( Player::HasSpell(52143)) { // Get list of dummy auras - Not working due to Master of Ghouls != dummy spell aura // 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(m_caster, 52150, false); else // Player has not got talent; cast time limited ghoul spell m_caster->CastSpell(m_caster, 46585, false); break; } } EDIT: Problem with this code is that Player::HasSpell is not a static function and thus cannot be used in such a way... I really need some help.
×
×
  • 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