

XTZGZoReX
Members-
Posts
240 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Everything posted by XTZGZoReX
-
Slash-commands are client-side.
-
[Patch] Implement account flags & cross-realm DK creation allowance
XTZGZoReX replied to a topic in ... under reviewOld
Well, actually IP locking and muting + some other things could use this field, but I won't focus on that right now . -
[Patch] Implement account flags & cross-realm DK creation allowance
XTZGZoReX replied to a topic in ... under reviewOld
Let me put it like this: Cluttering the table with more and more fields for things like this is pointless, when all we need are account flags. With this, only one field is ever needed. -
Nice find!
-
[Patch] Implement account flags & cross-realm DK creation allowance
XTZGZoReX replied to a topic in ... under reviewOld
Currently there's only one flag that has any meaning though, that's '1'. -
[Patch] Implement account flags & cross-realm DK creation allowance
XTZGZoReX replied to a topic in ... under reviewOld
There is no hack in this at all. Also, the field name is fine, because it can be used for other account-related flags in future. -
[Cleanup][8191] Remove long-time unused spell_affect table
XTZGZoReX replied to a topic in ... acceptedOld
... the wonders of git . -
Then I have no clue what you're talking about... There's only ONE thread that's going to access AuctionMgr::run, and that's its actual thread. So why put a mutex there to begin with? I don't think you get what a mutex does, or, you aren't explaining yourself properly.
-
Yes... I'm aware, but that was not my point. My point is that a mutex is blocking. Thus, adding a mutex to AuctionMgr::run would just make it block the rest of the server - in other words, make the whole patch pointless.
-
[Cleanup][8191] Remove long-time unused spell_affect table
XTZGZoReX replied to a topic in ... acceptedOld
Ah, I understand. I doubt they're going to remove it, though. That's just more work on their part, isn't it - much more work, actually? -
@xzbbzx: Yes, but that beats the purpose of this entire patch.
-
[Cleanup][8191] Remove long-time unused spell_affect table
XTZGZoReX replied to a topic in ... acceptedOld
If we really need to override Spell.dbc data, I think it'd be better to just have a table with the exact same structure as the DBC file, where you could override any values. -
Scenario: 1: I get a level 55 character on realm X - not on realm Y. 2: I should now be able to create a DK on both realm X and Y - even if I don't have a level 55 on realm Y. This is how retail does it now (since 3.1.x I think?). This patch will allow that, through implementing account flags. diff --git a/src/game/AccountMgr.cpp b/src/game/AccountMgr.cpp index b3ed91c..9f9a1a1 100644 --- a/src/game/AccountMgr.cpp +++ b/src/game/AccountMgr.cpp @@ -188,6 +188,38 @@ bool AccountMgr::GetName(uint32 acc_id, std::string &name) return false; } +uint32 AccountMgr::GetAccountFlags(uint32 accid) const +{ + uint32 res = ACC_FLAG_NONE_SET; + if(QueryResult* result = loginDatabase.PQuery("SELECT flag FROM account WHERE id = '%u'", accid)) + res = (*result)[0].GetUInt32(); + + return res; +} + +bool AccountMgr::HasAccountFlag(uint32 accid, AccountFlag flag) const +{ + if(QueryResult* result = loginDatabase.PQuery("SELECT flag FROM account WHERE id = '%u'", accid)) + if((*result)[0].GetUInt32() & flag) + return true; + + return false; +} + +void AccountMgr::AddAccountFlag(uint32 accid, AccountFlag flag) const +{ + loginDatabase.PExecute("UPDATE account SET flag = flag | '%u' WHERE id = '%u'", flag, accid); +} + +void AccountMgr::DelAccountFlag(uint32 accid, AccountFlag flag) const +{ + loginDatabase.PExecute("UPDATE account SET flag = flag &~ '%u' WHERE id = '%u'", flag, accid); +} + +void AccountMgr::SetAccountFlag(uint32 accid, AccountFlag flag) const +{ + loginDatabase.PExecute("UPDATE account SET flag = '%u' WHERE id = '%u'", flag, accid); +} + bool AccountMgr::CheckPassword(uint32 accid, std::string passwd) { normilizeString(passwd); diff --git a/src/game/AccountMgr.h b/src/game/AccountMgr.h index 86d0931..7aca6fd 100644 --- a/src/game/AccountMgr.h +++ b/src/game/AccountMgr.h @@ -33,6 +33,12 @@ enum AccountOpResult AOR_DB_INTERNAL_ERROR }; +enum AccountFlag +{ + ACC_FLAG_NONE_SET = 0, + ACC_FLAG_CAN_CREATE_HEROIC = 1 +}; + #define MAX_ACCOUNT_STR 16 class AccountMgr @@ -50,6 +56,11 @@ class AccountMgr uint32 GetId(std::string username); uint32 GetSecurity(uint32 acc_id); bool GetName(uint32 acc_id, std::string &name); + uint32 GetAccountFlags(uint32 accid) const; + bool HasAccountFlag(uint32 accid, AccountFlag flag) const; + void AddAccountFlag(uint32 accid, AccountFlag flag) const; + void DelAccountFlag(uint32 accid, AccountFlag flag) const; + void SetAccountFlag(uint32 accid, AccountFlag flag) const; static bool normilizeString(std::string& utf8str); }; diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index f8bd12d..dedf9bb 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -37,6 +37,7 @@ #include "Util.h" #include "ArenaTeam.h" #include "Language.h" +#include "AccountMgr.h" class LoginQueryHolder : public SqlQueryHolder { @@ -315,23 +316,11 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data ) return; } - // speedup check for heroic class disabled case - uint32 req_level_for_heroic = sWorld.getConfig(CONFIG_MIN_LEVEL_FOR_HEROIC_CHARACTER_CREATING); - if(GetSecurity()==SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT && req_level_for_heroic > sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL)) - { - data << (uint8)CHAR_CREATE_LEVEL_REQUIREMENT; - SendPacket( &data ); - return; - } - bool AllowTwoSideAccounts = !sWorld.IsPvPRealm() || sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_ACCOUNTS) || GetSecurity() > SEC_PLAYER; uint32 skipCinematics = sWorld.getConfig(CONFIG_SKIP_CINEMATICS); bool have_same_race = false; - // if 0 then allowed creating without any characters - bool have_req_level_for_heroic = (req_level_for_heroic==0); - if(!AllowTwoSideAccounts || skipCinematics == 1 || class_ == CLASS_DEATH_KNIGHT) { QueryResult *result2 = CharacterDatabase.PQuery("SELECT level,race,class FROM characters WHERE account = '%u' %s", @@ -358,13 +347,6 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data ) return; } } - - if(!have_req_level_for_heroic) - { - uint32 acc_level = field[0].GetUInt32(); - if(acc_level >= req_level_for_heroic) - have_req_level_for_heroic = true; - } } // need to check team only for first character @@ -412,20 +394,15 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data ) return; } } - - if(!have_req_level_for_heroic) - { - uint32 acc_level = field[0].GetUInt32(); - if(acc_level >= req_level_for_heroic) - have_req_level_for_heroic = true; - } } } delete result2; } } - if(GetSecurity()==SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT && !have_req_level_for_heroic) + bool can_heroic_db = accmgr.HasAccountFlag(GetAccountId(), ACC_FLAG_CAN_CREATE_HEROIC); + + if(GetSecurity()==SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT && !can_heroic_db) { data << (uint8)CHAR_CREATE_LEVEL_REQUIREMENT; SendPacket( &data ); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 29456e6..c9bb79c 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -58,6 +58,7 @@ #include "Spell.h" #include "SocialMgr.h" #include "AchievementMgr.h" +#include "AccountMgr.h" #include <cmath> @@ -2401,6 +2402,9 @@ void Player::GiveLevel(uint32 level) pet->SynchronizeLevelWithOwner(); GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL); + + if(level >= sWorld.getConfig(CONFIG_MIN_LEVEL_FOR_HEROIC_CHARACTER_CREATING)) + accmgr.AddAccountFlag(GetSession()->GetAccountId(), ACC_FLAG_CAN_CREATE_HEROIC); } void Player::InitTalentForLevel() SQL: ALTER TABLE account ADD COLUMN flag INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER locale; EDIT: Patch updated (July 10 00:16 +1 GMT) EDIT: Patch updated (July 10 01:39 +1 GMT) EDIT: Patch updated (July 10 15:39 +1 GMT) EDIT: Patch updated (July 10 19:11 +1 GMT) EDIT: Patch updated (July 11 13:23 +1 GMT)
-
[Cleanup][8191] Remove long-time unused spell_affect table
XTZGZoReX replied to a topic in ... acceptedOld
My opinion: If you need to override something with spell_affect... You're doing it wrong . It's a hack in the first place. -
After talking it over with vladimir on IRC, we agreed that we no longer have need for this table. The original purpose of it was to override DBC values if needed, but so far (for many months), that has not been needed, and the table is pretty much obsolete now. Update SQL: DROP TABLE IF EXISTS spell_affect; Patch: diff --git a/sql/mangos.sql b/sql/mangos.sql index c63f3b6..6d93bee 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -13457,29 +13457,6 @@ LOCK TABLES `skinning_loot_template` WRITE; UNLOCK TABLES; -- --- Table structure for table `spell_affect` --- - -DROP TABLE IF EXISTS `spell_affect`; -CREATE TABLE `spell_affect` ( - `entry` smallint(5) unsigned NOT NULL default '0', - `effectId` tinyint(3) unsigned NOT NULL default '0', - `SpellClassMask0` int(5) unsigned NOT NULL default '0', - `SpellClassMask1` int(5) unsigned NOT NULL default '0', - `SpellClassMask2` int(5) unsigned NOT NULL default '0', - PRIMARY KEY (`entry`,`effectId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- --- Dumping data for table `spell_affect` --- - -LOCK TABLES `spell_affect` WRITE; -/*!40000 ALTER TABLE `spell_affect` DISABLE KEYS */; -/*!40000 ALTER TABLE `spell_affect` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `spell_area` -- diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index af7c914..05ae1ef 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -442,7 +442,6 @@ ChatCommand * ChatHandler::getCommandTable() { "skill_extra_item_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSkillExtraItemTemplateCommand, "", NULL }, { "skill_fishing_base_level", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSkillFishingBaseLevelCommand, "", NULL }, { "skinning_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesSkinningCommand, "", NULL }, - { "spell_affect", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellAffectCommand, "", NULL }, { "spell_area", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellAreaCommand, "", NULL }, { "spell_bonus_data", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellBonusesCommand, "", NULL }, { "spell_chain", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellChainCommand, "", NULL }, diff --git a/src/game/Chat.h b/src/game/Chat.h index cd235d4..84b3cb4 100644 --- a/src/game/Chat.h +++ b/src/game/Chat.h @@ -369,7 +369,6 @@ class ChatHandler bool HandleReloadSkillDiscoveryTemplateCommand(const char* args); bool HandleReloadSkillExtraItemTemplateCommand(const char* args); bool HandleReloadSkillFishingBaseLevelCommand(const char* args); - bool HandleReloadSpellAffectCommand(const char* args); bool HandleReloadSpellAreaCommand(const char* args); bool HandleReloadSpellChainCommand(const char* args); bool HandleReloadSpellElixirCommand(const char* args); diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index 65fb77a..1b5ba65 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -151,7 +151,6 @@ bool ChatHandler::HandleReloadAllSpellCommand(const char*) { HandleReloadSkillDiscoveryTemplateCommand("a"); HandleReloadSkillExtraItemTemplateCommand("a"); - HandleReloadSpellAffectCommand("a"); HandleReloadSpellAreaCommand("a"); HandleReloadSpellChainCommand("a"); HandleReloadSpellElixirCommand("a"); @@ -481,14 +480,6 @@ bool ChatHandler::HandleReloadSkillFishingBaseLevelCommand(const char* /*args*/) return true; } -bool ChatHandler::HandleReloadSpellAffectCommand(const char*) -{ - sLog.outString( "Re-Loading SpellAffect definitions..." ); - spellmgr.LoadSpellAffects(); - SendGlobalSysMessage("DB table `spell_affect` (spell mods apply requirements) reloaded."); - return true; -} - bool ChatHandler::HandleReloadSpellAreaCommand(const char*) { sLog.outString( "Re-Loading SpellArea Data..." ); diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index df1cd54..2246b78 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1283,19 +1283,13 @@ void Aura::HandleAddModifier(bool apply, bool Real) mod->spellId = GetId(); uint32 const *ptr; - SpellAffectEntry const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex); - if (spellAffect) - ptr = &spellAffect->SpellClassMask[0]; - else + switch (m_effIndex) { - switch (m_effIndex) - { - case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break; - case 1: ptr = &m_spellProto->EffectSpellClassMaskB[0]; break; - case 2: ptr = &m_spellProto->EffectSpellClassMaskC[0]; break; - default: - return; - } + case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break; + case 1: ptr = &m_spellProto->EffectSpellClassMaskB[0]; break; + case 2: ptr = &m_spellProto->EffectSpellClassMaskC[0]; break; + default: + return; } mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32; @@ -1329,19 +1323,13 @@ void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/) mod->spellId = GetId(); uint32 const *ptr; - SpellAffectEntry const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex); - if (spellAffect) - ptr = &spellAffect->SpellClassMask[0]; - else + switch (m_effIndex) { - switch (m_effIndex) - { - case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break; - case 1: ptr = &m_spellProto->EffectSpellClassMaskB[0]; break; - case 2: ptr = &m_spellProto->EffectSpellClassMaskC[0]; break; - default: - return; - } + case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break; + case 1: ptr = &m_spellProto->EffectSpellClassMaskB[0]; break; + case 2: ptr = &m_spellProto->EffectSpellClassMaskC[0]; break; + default: + return; } mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32; diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 1dd4544..eb3bc84 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -692,126 +692,6 @@ void SpellMgr::LoadSpellTargetPositions() sLog.outString( ">> Loaded %u spell teleport coordinates", count ); } -void SpellMgr::LoadSpellAffects() -{ - mSpellAffectMap.clear(); // need for reload case - - uint32 count = 0; - - // 0 1 2 3 4 - QueryResult *result = WorldDatabase.Query("SELECT entry, effectId, SpellClassMask0, SpellClassMask1, SpellClassMask2 FROM spell_affect"); - if( !result ) - { - - barGoLink bar( 1 ); - - bar.step(); - - sLog.outString(); - sLog.outString( ">> Loaded %u spell affect definitions", count ); - return; - } - - barGoLink bar( result->GetRowCount() ); - - do - { - Field *fields = result->Fetch(); - - bar.step(); - - uint32 entry = fields[0].GetUInt32(); - uint8 effectId = fields[1].GetUInt8(); - - SpellEntry const* spellInfo = sSpellStore.LookupEntry(entry); - - if (!spellInfo) - { - sLog.outErrorDb("Spell %u listed in `spell_affect` does not exist", entry); - continue; - } - - if (effectId >= 3) - { - sLog.outErrorDb("Spell %u listed in `spell_affect` have invalid effect index (%u)", entry,effectId); - continue; - } - - if( spellInfo->Effect[effectId] != SPELL_EFFECT_APPLY_AURA || - spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_FLAT_MODIFIER && - spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_PCT_MODIFIER && - spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_TARGET_TRIGGER ) - { - sLog.outErrorDb("Spell %u listed in `spell_affect` have not SPELL_AURA_ADD_FLAT_MODIFIER (%u) or SPELL_AURA_ADD_PCT_MODIFIER (%u) or SPELL_AURA_ADD_TARGET_TRIGGER (%u) for effect index (%u)", entry,SPELL_AURA_ADD_FLAT_MODIFIER,SPELL_AURA_ADD_PCT_MODIFIER,SPELL_AURA_ADD_TARGET_TRIGGER,effectId); - continue; - } - - SpellAffectEntry affect; - affect.SpellClassMask[0] = fields[2].GetUInt32(); - affect.SpellClassMask[1] = fields[3].GetUInt32(); - affect.SpellClassMask[2] = fields[4].GetUInt32(); - - // Spell.dbc have own data - uint32 const *ptr = 0; - switch (effectId) - { - case 0: ptr = &spellInfo->EffectSpellClassMaskA[0]; break; - case 1: ptr = &spellInfo->EffectSpellClassMaskB[0]; break; - case 2: ptr = &spellInfo->EffectSpellClassMaskC[0]; break; - default: - continue; - } - if(ptr[0] == affect.SpellClassMask[0] || ptr[1] == affect.SpellClassMask[1] || ptr[2] == affect.SpellClassMask[2]) - { - char text[]="ABC"; - sLog.outErrorDb("Spell %u listed in `spell_affect` have redundant (same with EffectSpellClassMask%c) data for effect index (%u) and not needed, skipped.", entry, text[effectId], effectId); - continue; - } - - mSpellAffectMap[(entry<<8) + effectId] = affect; - - ++count; - } while( result->NextRow() ); - - delete result; - - sLog.outString(); - sLog.outString( ">> Loaded %u custom spell affect definitions", count ); - - for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id) - { - SpellEntry const* spellInfo = sSpellStore.LookupEntry(id); - if (!spellInfo) - continue; - - for (int effectId = 0; effectId < 3; ++effectId) - { - if( spellInfo->Effect[effectId] != SPELL_EFFECT_APPLY_AURA || - (spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_FLAT_MODIFIER && - spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_PCT_MODIFIER && - spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_TARGET_TRIGGER) ) - continue; - - uint32 const *ptr = 0; - switch (effectId) - { - case 0: ptr = &spellInfo->EffectSpellClassMaskA[0]; break; - case 1: ptr = &spellInfo->EffectSpellClassMaskB[0]; break; - case 2: ptr = &spellInfo->EffectSpellClassMaskC[0]; break; - default: - continue; - } - if(ptr[0] || ptr[1] || ptr[2]) - continue; - - if(mSpellAffectMap.find((id<<8) + effectId) != mSpellAffectMap.end()) - continue; - - sLog.outErrorDb("Spell %u (%s) misses spell_affect for effect %u",id,spellInfo->SpellName[sWorld.GetDefaultDbcLocale()], effectId); - } - } -} - bool SpellMgr::IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod) const { // false for spellInfo == NULL diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h index f6b71ae..cb4e975 100644 --- a/src/game/SpellMgr.h +++ b/src/game/SpellMgr.h @@ -335,13 +335,6 @@ bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group); DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group); int32 GetDiminishingReturnsLimitDuration(DiminishingGroup group, SpellEntry const* spellproto); -// Spell affects related declarations (accessed using SpellMgr functions) -struct SpellAffectEntry -{ - uint32 SpellClassMask[3]; -}; -typedef UNORDERED_MAP<uint32, SpellAffectEntry> SpellAffectMap; - // Spell proc event related declarations (accessed using SpellMgr functions) enum ProcFlags { @@ -632,14 +625,6 @@ class SpellMgr // Accessors (const or static functions) public: - // Spell affects - SpellAffectEntry const*GetSpellAffect(uint32 spellId, uint8 effectId) const - { - SpellAffectMap::const_iterator itr = mSpellAffectMap.find((spellId<<8) + effectId); - if( itr != mSpellAffectMap.end( ) ) - return &itr->second; - return 0; - } bool IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod) const; @@ -899,7 +884,6 @@ class SpellMgr void LoadSpellLearnSkills(); void LoadSpellLearnSpells(); void LoadSpellScriptTarget(); - void LoadSpellAffects(); void LoadSpellElixirs(); void LoadSpellProcEvents(); void LoadSpellBonusess(); @@ -918,7 +902,6 @@ class SpellMgr SpellLearnSkillMap mSpellLearnSkills; SpellLearnSpellMap mSpellLearnSpells; SpellTargetPositionMap mSpellTargetPositions; - SpellAffectMap mSpellAffectMap; SpellElixirMap mSpellElixirs; SpellProcEventMap mSpellProcEventMap; SpellBonusMap mSpellBonusMap; diff --git a/src/game/World.cpp b/src/game/World.cpp index bf20ccf..b7f3b4a 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1253,9 +1253,6 @@ void World::SetInitialWorldSettings() sLog.outString( "Loading Spell target coordinates..." ); spellmgr.LoadSpellTargetPositions(); - sLog.outString( "Loading SpellAffect definitions..." ); - spellmgr.LoadSpellAffects(); - sLog.outString( "Loading spell pet auras..." ); spellmgr.LoadSpellPetAuras();
-
By the way. I forgot if you have to increase MAX_NUMBER_OF_CELLS for a higher visibility distance, or if you must decrease it. What's the case?
-
I *think* it would've given the same result. Not sure though. But in any case, yours looks better.
-
http://paste2.org/p/309368 This make it completely possible to control max cells count at compile time since only one variable need changing. You can now make something like a --max-cells=4 command for automake or similar.
-
Fine by me, as long as it's fixed .
-
Oh, haha. Gotcha.
-
Can I see yours?
-
diff --git a/src/game/GridDefines.h b/src/game/GridDefines.h index d5ddf3a..9d704f9 100644 --- a/src/game/GridDefines.h +++ b/src/game/GridDefines.h @@ -65,7 +65,8 @@ typedef GridRefManager<GameObject> GameObjectMapType; typedef GridRefManager<Player> PlayerMapType; typedef Grid<Player, AllWorldObjectTypes,AllGridObjectTypes> GridType; -typedef NGrid<8, Player, AllWorldObjectTypes, AllGridObjectTypes> NGridType; +// use MAX_NUMBER_OF_CELLS to sync with changes in defines +typedef NGrid<MAX_NUMBER_OF_CELLS, Player, AllWorldObjectTypes, AllGridObjectTypes> NGridType; typedef TypeMapContainer<AllGridObjectTypes> GridTypeMapContainer; typedef TypeMapContainer<AllWorldObjectTypes> WorldTypeMapContainer; I noticed that the typedef for NGridType was never updated to reflect changes to the MAX_NUMBER_OF_CELLS #define. I think this might be the cause of many weird things, possibly even crashes.
-
[8072][patch] Get rid of data blob (first step)
XTZGZoReX replied to Auntie Mangos's topic in ... acceptedOld
I'd have to be against that, though. MaNGOS should avoid as much hard drive access as possible IMO. -
Just a heads-up. Talked with Wyk3d on IRC and came to the conclusion that the way I intended to do it originally (LoginDatabase.PExecute) is just fine for this purpose. I'm working on the patch submission now.
-
It's not like we're using some binary protocol to send opcodes, so...You people should jump on the IRC if you want to follow development more.
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®