*Add column heroic_level_min in table access_requirement
--HG-- branch : trunk
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `access_requirement` ADD COLUMN `heroic_level_min` tinyint(3) unsigned NOT NULL default '0' AFTER `level_min`;
|
||||||
@@ -5384,8 +5384,8 @@ void ObjectMgr::LoadAccessRequirements()
|
|||||||
|
|
||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
|
|
||||||
// 0 1 2 3 4 5 6 7 8 9 10
|
// 0 1 2 3 4 5 6 7 8 9 10 11
|
||||||
QueryResult *result = WorldDatabase.Query("SELECT id, level_min, level_max, item, item2, heroic_key, heroic_key2, quest_done, quest_failed_text, heroic_quest_done, heroic_quest_failed_text FROM access_requirement");
|
QueryResult *result = WorldDatabase.Query("SELECT id, level_min, level_max, item, item2, heroic_key, heroic_key2, quest_done, quest_failed_text, heroic_quest_done, heroic_quest_failed_text, heroic_level_min FROM access_requirement");
|
||||||
if( !result )
|
if( !result )
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -5413,7 +5413,8 @@ void ObjectMgr::LoadAccessRequirements()
|
|||||||
AccessRequirement ar;
|
AccessRequirement ar;
|
||||||
|
|
||||||
ar.levelMin = fields[1].GetUInt8();
|
ar.levelMin = fields[1].GetUInt8();
|
||||||
ar.levelMax = fields[2].GetUInt32();
|
ar.levelMax = fields[2].GetUInt8();
|
||||||
|
ar.heroicLevelMin = fields[11].GetUInt8();
|
||||||
ar.item = fields[3].GetUInt32();
|
ar.item = fields[3].GetUInt32();
|
||||||
ar.item2 = fields[4].GetUInt32();
|
ar.item2 = fields[4].GetUInt32();
|
||||||
ar.heroicKey = fields[5].GetUInt32();
|
ar.heroicKey = fields[5].GetUInt32();
|
||||||
|
|||||||
+10
-4
@@ -15686,12 +15686,18 @@ bool Player::Satisfy(AccessRequirement const *ar, uint32 target_map, bool report
|
|||||||
if(!isGameMaster() && ar)
|
if(!isGameMaster() && ar)
|
||||||
{
|
{
|
||||||
uint32 LevelMin = 0;
|
uint32 LevelMin = 0;
|
||||||
if(getLevel() < ar->levelMin && !sWorld.getConfig(CONFIG_INSTANCE_IGNORE_LEVEL))
|
|
||||||
LevelMin = ar->levelMin;
|
|
||||||
|
|
||||||
uint32 LevelMax = 0;
|
uint32 LevelMax = 0;
|
||||||
if(ar->levelMax >= ar->levelMin && getLevel() > ar->levelMax && !sWorld.getConfig(CONFIG_INSTANCE_IGNORE_LEVEL))
|
|
||||||
|
if(!sWorld.getConfig(CONFIG_INSTANCE_IGNORE_LEVEL))
|
||||||
|
{
|
||||||
|
if(ar->levelMin && getLevel() < ar->levelMin)
|
||||||
|
LevelMin = ar->levelMin;
|
||||||
|
else if(ar->heroicLevelMin && GetDifficulty() == DIFFICULTY_HEROIC
|
||||||
|
&& getLevel() < ar->heroicLevelMin)
|
||||||
|
LevelMin = ar->heroicLevelMin;
|
||||||
|
if(ar->levelMax && getLevel() > ar->levelMax)
|
||||||
LevelMax = ar->levelMax;
|
LevelMax = ar->levelMax;
|
||||||
|
}
|
||||||
|
|
||||||
uint32 missingItem = 0;
|
uint32 missingItem = 0;
|
||||||
if(ar->item)
|
if(ar->item)
|
||||||
|
|||||||
@@ -759,6 +759,7 @@ struct AccessRequirement
|
|||||||
{
|
{
|
||||||
uint8 levelMin;
|
uint8 levelMin;
|
||||||
uint8 levelMax;
|
uint8 levelMax;
|
||||||
|
uint8 heroicLevelMin;
|
||||||
uint32 item;
|
uint32 item;
|
||||||
uint32 item2;
|
uint32 item2;
|
||||||
uint32 heroicKey;
|
uint32 heroicKey;
|
||||||
|
|||||||
Reference in New Issue
Block a user