maly32167
Members-
Posts
72 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
maly32167's Achievements
Advanced Member (3/3)
0
Reputation
-
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;
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®