balrok
-
Posts
222 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Posts posted by balrok
-
-
hello,
i'm certainly not the author of the bg-system inside mangos..
i only changed it (:
also i can't do anything right now, cause i switch my home and so i have no computer with client for testing..
my work so far is moving the bg-spawnsystem to the map-class here: http://github.com/balrok/mangos/commits/map_spawning
afaik this already was working.. only db-records for doors had to be changed..
i was thinking how to improve speed a bit, since now every spawn will look up inside the spawn-event map and also i'm not very content how doors are handled yet..
this spawnsystem move currently has no visible effect, but is needed as a base for the outdoor-patch, since we have very much spawns there which could be handled quite good with the database..
also this can be used then for scripts to move spawns into the database..
I'm sorry to delay this that much, i hoped to finish it somewhere in my holidays but had way too much other stuff todo
if someone want's to make it work again, i'm happy to help..
the current problems are spawning and gossip
and for 0.12 current problem is backporting the latest battlegroundchanges http://github.com/balrok/mangos/commits/backport
and then do the same as in master which shouldn't be hard to do, since the code is very similar
edit: http://github.com/balrok/mangos/commits/outdoor_dev is outdoor merged with mapspawning and some work to convert the spawnpositions from code to db
-
i can confirm this.. reverting the mentioned commit also fixed the behaviour
-
in mangos-0.12 since commit: ac9a55f8195c54f195dc83c32f3b819c391a3e74 you can't return quests to gameobjects
a fix was:
--- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2726,8 +2726,19 @@ void Spell::SendLoot(uint64 guid, LootType loottype) player->GetMap()->ScriptsStart(sGameObjectScripts, gameObjTarget->GetDBTableGUIDLow(), player, gameObjTarget); return; + case GAMEOBJECT_TYPE_QUESTGIVER: + // start or end quest + player->PrepareQuestMenu(guid); + player->SendPreparedQuest(guid); + return; + case GAMEOBJECT_TYPE_SPELL_FOCUS: + // triggering linked GO + if (uint32 trapEntry = gameObjTarget->GetGOInfo()->spellFocus.linkedTrapId) + gameObjTarget->TriggeringLinkedGameObject(trapEntry,m_caster); + return; + case GAMEOBJECT_TYPE_GOOBER: // goober_scripts can be triggered if the player don't have the quest if (gameObjTarget->GetGOInfo()->goober.eventId)
so this is basically reverting that part from that commit.. i'm not sure how to correctly fix it..
big thanks to sarjuuk in this place, he helped testing while i did git bisect to find that error
-
hello, yesterday i found the commit which crashed it, but had no time for a report or even a fix:
i don't know exactly how to crash, but i guess it's crashing when you do alt+f4 in instances
the mangos-commit which introduced the crash is:
8eb70eff6e9727a404e095a9978add4fd09677fc
so reverting it will stop the crash
also it seems that backporting some other commits can fix that crash too:
this backport consists of several other commits, i mostly diffed the Map.cpp and took the changes for that specific function
but had no bigger testruns yet..
-
it seems to work fine on 0.12 with this patch:
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 6975066..e4a5bc8 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5678,8 +5678,6 @@ void Spell::FillRaidOrPartyTargets( UnitList &TagUnitMap, Unit* target, float ra WorldObject* Spell::GetCastingObject() const { - if (IS_GAMEOBJECT_GUID(m_originalCasterGUID)) - return m_caster->IsInWorld() ? m_caster->GetMap()->GetGameObject(m_originalCasterGUID) : NULL; - else - return m_caster; + return (m_caster->IsInWorld() && m_originalCasterGUID && m_caster->GetGUID() != m_originalCasterGUID) ? + Unit::GetUnit(*m_caster, m_originalCasterGUID) : m_caster; }
but we haven't tested much yet.. next week might be better results
-
if you are not willing to write a proper bugreport, then just don't do anything at all..
you haven't even specified if its master or mangos-0.12
and i don't have to waste time on improper bugreports.. with your information i can dig up everything on my own.. have to guess what version you're using and so on..
i haven't deleted your thread to give you a chance not to get such a rude answer..
-
hello, sarjuuk and me did some stuff to make it work with mangos-0.12
and at first test it seems to work ok..
we had to remove your change about the summonlevel, else the creature got always a different level.. then we added a 10% chance that doomguard get's summoned (was changed with wotlk)
and then tempsummons shouldn't despawn when creature is enslaved (not sure if this is valid for all tempsummon-types)
edit: we changed the summoner to ptarget.. not sure if it's right, maybe i will edit this post later
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 57d483a..c97bcb0 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5923,6 +5923,12 @@ void Aura::PeriodicTick() SpellPeriodicAuraLogInfo pInfo(this, pdamage, absorb, resist, 0.0f); m_target->SendPeriodicAuraLog(&pInfo); + // Curse of Doom summon + if (GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARLOCK && GetSpellProto()->SpellFamilyFlags & UI64LIT(0x200000000)) + if (pCaster->GetTypeId() == TYPEID_PLAYER && m_target->GetHealth() <= pdamage && ((Player*)pCaster)->isHonorOrXPTarget(m_target)) + if (roll_chance_i(10)) + m_target->CastSpell(m_target, 18662, true); + pCaster->DealDamage(m_target, (pdamage <= absorb+resist) ? 0 : (pdamage-absorb-resist), &cleanDamage, DOT, GetSpellSchoolMask(GetSpellProto()), GetSpellProto(), true); pCaster->ProcDamageAndSpell(m_target, PROC_FLAG_PERIODIC_TICK, PROC_FLAG_TAKE_DAMAGE, (pdamage <= absorb+resist) ? 0 : (pdamage-absorb-resist), GetSpellSchoolMask(GetSpellProto()), GetSpellProto()); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index c70ddfc..adb05bd 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3489,7 +3489,7 @@ void Spell::DoSummonWild(SpellEffectIndex eff_idx, uint32 forceFaction) int32 duration = GetSpellDuration(m_spellInfo); TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_OR_DEAD_DESPAWN; - int32 amount = damage > 0 ? damage : 1; + int32 amount = damage > 0 && m_spellInfo->Id != 18662 ? damage : 1; for(int32 count = 0; count < amount; ++count) { diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp index 09c0661..2197c15 100644 --- a/src/game/TemporarySummon.cpp +++ b/src/game/TemporarySummon.cpp @@ -34,6 +34,10 @@ void TemporarySummon::Update( uint32 diff ) break; case TEMPSUMMON_TIMED_DESPAWN: { + // if creature is enslaved it won't get unsummoned + if (GetCharmerGUID()) + break; + if (m_timer <= diff) { UnSummon(); @@ -45,6 +49,10 @@ void TemporarySummon::Update( uint32 diff ) } case TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT: { + // if creature is enslaved it won't get unsummoned + if (GetCharmerGUID()) + break; + if (!isInCombat()) { if (m_timer <= diff) @@ -63,6 +71,10 @@ void TemporarySummon::Update( uint32 diff ) case TEMPSUMMON_CORPSE_TIMED_DESPAWN: { + // if creature is enslaved it won't get unsummoned + if (GetCharmerGUID()) + break; + if ( m_deathState == CORPSE) { if (m_timer <= diff) @@ -77,6 +89,10 @@ void TemporarySummon::Update( uint32 diff ) } case TEMPSUMMON_CORPSE_DESPAWN: { + // if creature is enslaved it won't get unsummoned + if (GetCharmerGUID()) + break; + // if m_deathState is DEAD, CORPSE was skipped if ( m_deathState == CORPSE || m_deathState == DEAD) { @@ -88,6 +104,10 @@ void TemporarySummon::Update( uint32 diff ) } case TEMPSUMMON_DEAD_DESPAWN: { + // if creature is enslaved it won't get unsummoned + if (GetCharmerGUID()) + break; + if ( m_deathState == DEAD ) { UnSummon(); @@ -97,6 +117,10 @@ void TemporarySummon::Update( uint32 diff ) } case TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN: { + // if creature is enslaved it won't get unsummoned + if (GetCharmerGUID()) + break; + // if m_deathState is DEAD, CORPSE was skipped if ( m_deathState == CORPSE || m_deathState == DEAD) { @@ -120,6 +144,10 @@ void TemporarySummon::Update( uint32 diff ) } case TEMPSUMMON_TIMED_OR_DEAD_DESPAWN: { + // if creature is enslaved it won't get unsummoned + if (GetCharmerGUID()) + break; + // if m_deathState is DEAD, CORPSE was skipped if (m_deathState == DEAD) { @@ -127,6 +155,10 @@ void TemporarySummon::Update( uint32 diff ) return; } + // if creature is enslaved it won't get unsummoned + if (GetCharmerGUID()) + return; + if (!isInCombat() && isAlive() ) { if (m_timer <= diff)
edit2: i've mixed this patch with another one.. this time i've edited a clean version of mangos-0.12 diff
-
after some tests with Sarjuuk we found that:
[9510] Gameobject casting improvements.
is the root of all evil.. reverting this tempfixed this bug.. if someone finds a better solution: you're welcome..
-
is working?
i've found at least one bug with spiritguides, but i know, that it didn't fix the resurrection fully.. since it's very hard to reproduce it would be nice if someone has more information..
-
big thx on that bugreport.. i also think invitation should only be sent to one if it's realy sent to multiple ones this will be a first step in solving this nasty bug .. but don't know if i can fix this..
ps: i've removed your pictures.. i think it's forbidden to post ingame pics.. but anyway they don't help discovering the problem..
-
it's now fixed in 9592, thx for the detailed reports and espacialy the backtrace
-
@alex:
but if the player realy can loot the chests a 2nd time, there is either an exploit that players could loot randomly chests or that the chest isn't despawned from the core point of
view..
or will "updateobjectvisibility" also despawn that gameobject?
-
i would do it with this (warning mostly pseudocode):
m_mailItemMap.clear();
QueryResult *result = WorldDatabase.PQuery(
"SELECT e.id,i.mail_id, e.receiver, e.subject, e.message, e.money, i.item, i.count FROM mail_external e LEFT JOIN mail_external_items i ON e.id = i.mail_id order by e.id");
do
{
Field *fields = result->Fetch();
uint32 mailid = fields[0].GetUInt32();
uint32 mailid_items = fields[1].getuit32();
if (mailid == mailid_items)
{
// this mail has items add it to the map
// in real code you need to first check if m_mailItemMap[mailid] exists, if not create a new vector..
m_mailItemMap[mailid].push_back(your_var_containing_item_information);
}
...
the m_mailItemMap must be defined like this
std::map<uint32, std::vector<uint32> > MailItemMapType;
..
and about the nested select from dasblub.. i think in mysqldocs it's also explained, that this is totaly aequivalent to semi-join..
semi join will be good if you just want those mails, which actually have at least mailitem, but would be bad if you want mails with or without items.. for the later case a left-join is realy what he needs..
and still i'm not totaly sure, if i understand your question.. just look at the code how to handle mysqlresults.. or?
ok after this code-example i now see the problem and this post is mostly useless..
-
Basically if I do a normal left join I'd get something like
Mail - ID: 1 - Mail Item 1 - Mail Item 2 - Mail Item 3 Mail - ID: 2 - Mail Item 4 - Mail Item 5 - Mail Item 6
However I wonder how I could loop over the mail items then, adding them to the mail template ain't a problem.
no you will get something like
Mail - ID: 1 - Mail Item 1 Mail - ID: 1 - Mail Item 2 Mail - ID: 1 - Mail Item 3 Mail - ID: 2 - Mail Item 4 Mail - ID: 2 - Mail Item 5 Mail - ID: 2 - Mail Item 6
and it looks more like a semijoin for me.. or why you want to select mailitems, which don't have a mailid assigned to it?
and the post from dasblub is a semijoin..
-
in BattleGroundMgr::LoadBattleEventIndexes i used a full outer join this is, cause mysql doesn't support it, a full left outer and a full right outer join..
maybe that can help you..
but i don't realy understand what you're asking for..
you want to know what happens with those variables, which aren't in the db?
i did checks like:SELECT bla.a, bla2.a FROM bla LEFT OUTER JOIN bla2 ON bla.a=bla2.a
and then
check in the code if bla.a equals bla2.a.. if not, one of those must be NULL.. but maybe in this implementation we also can check directly for NULL.. i'm not very sure..
ah maybe i understand you now..
so you are asking how to do the 1->* relation
your result will look like this:
mail | item
1 | 123
1 | 456
2 | NULL
then just use and std::map<uint32 (mailid),std::vector<uint32(itemid)> > mailmap
add your mails to this map and then push all items with the same mailid to the mailmap-vector
and your select might look like this
and checking if an item exists, you select the mailid once from "mails" table and once from "mail_items" table.. and if mail_items is NULL the mails.mailid != mail_items.mailid
i hope i wasn't to confusing and could answer your problem somehow..
-
sounds for me like the problem is mostly, that people can aggro the spiritguide.. this bug might be new, since the spiritguides aren't dead now anymore..
this is the only explanation i have for this... since those spritguides have this in their ai
void UpdateAI(const uint32 uiDiff){
// auto cast the whole time this spell
if (!m_creature->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
m_creature->CastSpell(m_creature, SPELL_SPIRIT_HEAL_CHANNEL, false);
if the aggroing is 100% reproducible, it would be good to find out which functions are called, then we can add exceptions for the isInvisibleForAlive auras.. or maybe check in those aggro-cases if units can see each other...
ps: an idea how to hackfix this:
diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cppindex 0e8daef..1493b6b 100644
--- a/scripts/battlegrounds/battleground.cpp
+++ b/scripts/battlegrounds/battleground.cpp
@@ -53,8 +53,16 @@ struct MANGOS_DLL_DECL npc_spirit_guideAI : public ScriptedAI
{
}
+ void Aggro(Unit *who)
+ {
+ //Don't do anything
+ }
+
void UpdateAI(const uint32 uiDiff)
{
+ if (!m_creature->getThreatManager().isThreatListEmpty())
+ EnterEvadeMode();
+
// auto cast the whole time this spell
if (!m_creature->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
m_creature->CastSpell(m_creature, SPELL_SPIRIT_HEAL_CHANNEL, false);
-
looks interesting.
it seems that the 2nd field in CreatureDisplayInfo is something like the ModelGroup and when a shapeshift spell has an horde model it's then in the ((alliances' ModelGroup ) +1)
but unluckily the different colors can't be extracted without string comparision
so it seems that we realy need to hardcode those ids
-
i don't think it's a new feature.. but 90% of the data in characters.data are calculated on startup.. also note, that many data is now also in different tables.. plans are to remove this field from the characters table in future
-
porting to homebind is totally wrong, the flag must be removed from the player when he logs out and his last position must be stored, in db so that he get's to this position at login..
don't know where exactly the problem is.. but at least i haven't ever heared, that porting to homebind is blizzlike
edit: i think i know why:
the player who logs out is under attack when he is logging out, a player who logs out and is under attack will be repopped at the graveyard.. and AFTER this we call the dropflag method
so things which need to be done:
dropping the flag before repopping the player
probably something like:
and then saving the deathstate for the player somehow when he logs out from bg.. but don't know.. maybe this is just a bug in Player::SaveToDB() or something else..
-
last crash is fixed in 9012 - thx for report
-
maybe you edit your post inside this thread.. else it's quite strange to discuss here about another thread..
to have it work under windows you just can use the mangos's getMSTime()
it's located in src/shared/Timer.h
ps: i don't plan to review it.. spellsystem is too complex for me
-
hello, good to see
the m_endtimer is ok i think.. at least i have no idea for a better name
+ uint32 h = GetTeamScore(HORDE);
+ uint32 a = GetTeamScore(ALLIANCE);
should be avoided, please use meaningful variablenames or maybe just replace the variables by the functioncalls
and we can avoid the variable LastEndTimeMinutes
uint32 old_minutes = GetEndTimeMinutes() ; m_EndTimer -= diff; if(GetEndTimeMinutes() != old_minutes) ...
also i would write:
return m_EndTimer / (MINUTE * IN_MILISECONDS);
or is ceiling the result really needed?
i think it's possible to use ceil also on plain integer division without casting it to float first
edit: if (m_EndTimer > 0) should be
if (m_EndTimer - diff > 0)
else it will get negative
-
yes i've tested with
1/0 = exception
1/0.0 = -infininite
was on linux a c-program with g++ compiled
quite tricky those floats.. i've also thought until now that this would throw an exception..
-
for clarification:
int(1/float(0.0)) will be -2147483648
(haven't knewn this before)
[fixed][mangos-0.12][crash][map]
in OldBug reports
Posted
this bunch of patches will work: http://pastebin.com/razGA5EN
(my backport-patch, which i posted in the top of this thread just introduced other crashes )
and now the patch is also tested (i think server is running two days now..)