maly32167
Members-
Posts
72 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Everything posted by maly32167
-
How to send CHAT_MSG_RAID_BOSS_EMOTE to 1 player
maly32167 replied to a topic in OldCore modifications
You seem to have old version of mangos it is not guid anymore but Unit * -
How to send CHAT_MSG_RAID_BOSS_EMOTE to 1 player
maly32167 replied to a topic in OldCore modifications
so yes - it was probably missing c_str() cast so if you have std::string text just make it plr->MonsterTextEmote(text.c_str(), plr, true); -
How to send CHAT_MSG_RAID_BOSS_EMOTE to 1 player
maly32167 replied to a topic in OldCore modifications
Where did you use it ? maybe try implementing some headers like Object.h in whatever file you are in cause I wrote Player * plr = NULL; plr->MonsterTextEmote("test", plr, true); and it compiled just fine Edit: ok You use std::string so do smth like std::string str = "mystring%s smth etc"; plr->MonsterTextEmote(str.c_str(), plr, true); (you need to use c_str() on std::strings to convert it to char * -
How to send CHAT_MSG_RAID_BOSS_EMOTE to 1 player
maly32167 replied to a topic in OldCore modifications
can't you just do: player->MonsterTextEmote("yourtext", player, true); ? Edit: true is for making it boss emote (one you wrote about) -
It will be an offtopic but If I may know, can you explain why ? I think implementing shared_ptr would be really efficient on mangos, especially as its stable-going project and I can imagine that implementation would be succesful compared to ascent which failed at its implementation long time ago.
-
[Rev - Latest] So, for example we have Spiritual Attunement talent of prot paladin It should give mana on all heals on mangos it works only on direct heals (as procflag is 2048 + 32768) I've set procflag to add periodic spells (524288) thing is 524288 is default for negative spells so I made proc-ex for it (262144) - PROC_EX_PERIODIC_POSITIVE = 0x0040000 However setting proc-ex makes 2048 + 32768 proc-flag not procc anymore Conclusion: You cannot make spell proc on both direct-spells and periodic-positive-only at once cause setting proc-ex for positive periodics will make direct spells not active anymore. Hope you understand the problem. Regards, Feanordev.
-
what if someone havent grid unloading turned on ? does it make any difference ?
-
Well 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? - Instance Data boolean value ? 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? - Blizz uses invisible triggers for such then for mobs add OnDied -> Set trigger variable -> if variable = 6 -> spawn mob everything but second (I dont actually understand second fully), is doable big problems
-
I've had such handling (proper message before instance loading) but cant find it anymore, prolly lost due to changes with instance IDs and so on (it was like 1 year ago ) I will try to get proper way handling but cant promise anything (Actually I think I even tryed sometime ago but I failed)
-
I see, actually I havent tested it I just based my opinion on if (target.reflectResult == SPELL_MISS_REFLECT) // Impossible reflect again, so simply deflect spell target.reflectResult = SPELL_MISS_PARRY; Probably it must be checked in different place (or second time at spellhit) not where it is atm.
-
As for delayed spells no - I also used some other patch from mangos forum to select which spells should be reflected- I have seen You also work on this I havent this patch on 'live' server so can't get much of feedback yet This code doesnt change much - there is check so You cant reflect reflected spell thus mask-removal is applied on reflected one - therefore it cant loop so no bugs should be "exposed" in this patch
-
Spellsteal should have the same chances to miss(resist) as dispel (it is dispel-type mechanic) this applies such chance to miss spellsteal effect diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 5e9cd37..9bc0fe3 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -9196,7 +9196,22 @@ void Spell::EffectStealBeneficialBuff(SpellEffectIndex eff_idx) SpellAuraHolder *holder = steal_list[urand(0, list_size-1)]; // Not use chance for steal // TODO possible need do it - success_list.push_back( std::pair<uint32,uint64>(holder->GetId(),holder->GetCasterGUID())); + + int32 miss_chance = 0; + // Apply dispel mod from aura caster + if (Unit *caster = holder->GetCaster()) + { + if (Player* modOwner = caster->GetSpellModOwner()) + { + modOwner->ApplySpellMod(holder->GetSpellProto()->Id, SPELLMOD_RESIST_DISPEL_CHANCE, miss_chance, this); + miss_chance += modOwner->GetTotalAuraModifier(SPELL_AURA_MOD_DISPEL_RESIST); + } + } + + // Try dispel + if (!roll_chance_i(miss_chance)) + success_list.push_back( std::pair<uint32,uint64>(holder->GetId(),holder->GetCasterGUID())); + else m_caster->SendSpellMiss(unitTarget, holder->GetSpellProto()->Id, SPELL_MISS_RESIST); // Remove buff from list for prevent doubles for (std::vector<SpellAuraHolder *>::iterator j = steal_list.begin(); j != steal_list.end(); )
-
After being not able to enter instance player is first teleported at the position he was before teleport (Instance entrance) - if player cannot be teleported back, then its ported to its homebind. In short - it fixes annoying teleport to homebind after- entering in-progress instance. diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index 3b96531..ac4e9cf 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -47,7 +47,11 @@ void WorldSession::HandleMoveWorldportAckOpcode() if (_player->GetVehicleKit()) _player->GetVehicleKit()->RemoveAllPassengers(); - // get the teleport destination + // get current and teleport destination + float currx,curry,currz; + uint32 currmap = GetPlayer()->GetMapId(); + GetPlayer()->GetPosition(currx,curry,currz); + WorldLocation &loc = GetPlayer()->GetTeleportDest(); // possible errors in the coordinate validity check @@ -85,9 +89,13 @@ void WorldSession::HandleMoveWorldportAckOpcode() GetPlayer()->ResetMap(); sLog.outError("WorldSession::HandleMoveWorldportAckOpcode: player %s (%d) was teleported far but couldn't be added to map. (map:%u, x:%f, y:%f, " - "z:%f) We port him to his homebind instead..", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.mapid, loc.coord_x, loc.coord_y, loc.coord_z); - // teleport the player home - GetPlayer()->TeleportToHomebind(); + "z:%f) Trying to port him to his previous place..", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.mapid, loc.coord_x, loc.coord_y, loc.coord_z); + // Teleport to previous place, if cannot be ported back TP to homebind place + if( !GetPlayer()->TeleportTo(currmap, currx,curry,currz, 0)) + { + sLog.outError("WorldSession::HandleMoveWorldportAckOpcode: player %s cannot be ported to his previous place, teleporting him to his homebind place...", GetPlayer()->GetName()); + GetPlayer()->TeleportToHomebind(); + } return; }
-
Well Im using it for a lil bit, works fine, just this shouldnt be the way its done, probably would be needed to re-change whole idea of handling IsEffectHandledOnDelayedSpellLaunch again (even though it was added not so long ago )
-
This fixed reflected delayed spells (not instant) to have effects applied at all and to have damage in its info too. Maybe its not the way it should be done - Im not actually sure I have been writting it to just fix it and by printf-debugging I found out that at delayed reflect spell's mask is taken out thus effects arent processed at all also due to DelayedSpellLaunch handling, damage is not applied at all if its reflected, would be good to have opinion from devs. diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 36a3d43..d4d6d7d 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1062,7 +1062,18 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) // mark effects that were already handled in Spell::HandleDelayedSpellLaunch on spell launch as processed for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i) if (IsEffectHandledOnDelayedSpellLaunch(m_spellInfo, SpellEffectIndex(i))) - mask &= ~(1<<i); + { + if(missInfo == SPELL_MISS_REFLECT) + { + SpellNonMeleeDamage damageInfo(caster, unitTarget, m_spellInfo->Id, m_spellSchoolMask); + caster->CalculateSpellDamage(&damageInfo, m_damage, m_spellInfo, m_attackType); + unitTarget->CalculateAbsorbResistBlock(caster, &damageInfo, m_spellInfo); + caster->DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb); + m_damage += damageInfo.damage; + } + else + mask &= ~(1<<i); + } // maybe used in effects that are handled on hit m_damage += target->damage;
-
never seen anyone doing that, maybe you have a core mod that affects damage or your players are hacking in some say Sorry but uhm... that You never seen anyone doing that doesnt mean it doesnt exist; It is very old problem of mangos - just look at: Blood Pack + Commanding Shout, Blessing of Might + Battle Shout, many many more. the above patch fixes every case of should-not-stacking spells
-
Actually this patch was working perfect. Any chance to get it updated nos4r2zod ? I tryed to work a bit on it but I must have missed something as It wasnt working properly for me... Gonna try again today as it was really good patch (Hope someone else from devs maybe could take look at it and say a word about quality of this ?)
-
Ah, sorry Ankso - I forgot to check if procSpell exists at all, got this crash later too (didnt when I checked random hot)
-
First on pos is not warrior but DK and yes DK has a lot of threat-related problems...
-
This is what I wrote for this annoying bug, hacky but I couldnt find real source of it too, stealth has procflag & PROC_FLAG_ON_TAKE_PERIODIC but problem is with - Taken spell periodic (damage / healing, determined from 14-17 flags) mangos doesnt determine whether its damage or healing (and I dont know wtf these 14-17 flags are..) this code doesnt break anything but it doesnt change that its hacky and damage mismatch for proc may be bugging not only stealth... diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp index 95bab48..838b6d7 100644 --- a/src/game/UnitAuraProcHandler.cpp +++ b/src/game/UnitAuraProcHandler.cpp @@ -383,6 +383,19 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, SpellAuraHolder* holder, S if (!allow) return false; } + + if (EventProcFlag & PROC_FLAG_ON_TAKE_PERIODIC && GetTypeId() == TYPEID_PLAYER && procSpell && IsPositiveSpell(procSpell->Id)) + { + bool allow = true; + for(int i = 0; i < 3; ++i) + if(Aura * pAur = holder->GetAuraByEffectIndex(SpellEffectIndex(i))) + if(pAur->GetModifier()->m_auraname == SPELL_AURA_MOD_STEALTH) + allow = false; + + if (!allow) + return false; + } + // Aura added by spell can`t trogger from self (prevent drop charges/do triggers) // But except periodic triggers (can triggered from self) if(procSpell && procSpell->Id == spellProto->Id && !(spellProto->procFlags & PROC_FLAG_ON_TAKE_PERIODIC))
-
Added spellmod - updated first post (I think we should add option to apply spell-mod at SetAuraDuration functions so we don't have to add spellmod function at every hard-coded spell/talent)
-
To remove... (sry for doublepost:P)
-
Talent Cut to the Chase refresh Slice and Dice only to current duration and should refresh to duration of 5cp diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp index a164d83..6845347 100644 --- a/src/game/UnitAuraProcHandler.cpp +++ b/src/game/UnitAuraProcHandler.cpp @@ -1647,6 +1647,10 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura if (spellProto->SpellFamilyName == SPELLFAMILY_ROGUE && (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000040000))) { + int32 duration = GetSpellMaxDuration(spellProto); + if(GetTypeId() == TYPEID_PLAYER) + static_cast<Player*>(this)->ApplySpellMod(spellProto->Id, SPELLMOD_DURATION, duration); + (*itr)->SetAuraMaxDuration(duration); (*itr)->GetHolder()->RefreshHolder(); return SPELL_AURA_PROC_OK; }
Contact Us
To contact us
click here
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
You can also email us at [email protected]
Privacy Policy | Terms & Conditions
Copyright © getMaNGOS. All rights Reserved.
This website is in no way associated with or endorsed by Blizzard Entertainment®
This website is in no way associated with or endorsed by Blizzard Entertainment®