*Update to Mangos 7092.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-16 14:17:24 -06:00
parent 14e38a3ddf
commit 40a1154c5b
20 changed files with 351 additions and 142 deletions
+8
View File
@@ -218,11 +218,19 @@ CREATE TABLE `spell_proc_event` (
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `player_xp_for_level`;
CREATE TABLE `player_xp_for_level` (
`lvl` int(3) unsigned NOT NULL,
`xp_for_next_level` int(10) unsigned NOT NULL,
PRIMARY KEY (`lvl`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO world.player_classlevelstats SELECT * FROM mangos.player_classlevelstats;
INSERT INTO world.player_levelstats SELECT * FROM mangos.player_levelstats;
INSERT INTO world.playercreateinfo_spell SELECT * FROM mangos.playercreateinfo_spell;
INSERT INTO world.playercreateinfo_action SELECT * FROM mangos.playercreateinfo_action;
INSERT INTO world.spell_learn_spell SELECT * FROM mangos.spell_learn_spell;
INSERT INTO world.player_xp_for_level SELECT * FROM mangos.player_xp_for_level;
DELETE FROM item_template WHERE entry IN (34648,34649,34650,34651,34652,34653,34655,34656,34657,34658,34659,38145,38147,41751);
+100 -1
View File
@@ -22,7 +22,7 @@
DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`required_7078_01_mangos_spell_proc_event` bit(1) default NULL
`required_7092_01_mangos_player_xp_for_level` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
@@ -9291,6 +9291,105 @@ INSERT INTO `player_levelstats` VALUES
/*!40000 ALTER TABLE `player_levelstats` ENABLE KEYS */;
UNLOCK TABLES;
-- ----------------------------
-- Table structure for player_xp_for_level
-- ----------------------------
DROP TABLE IF EXISTS `player_xp_for_level`;
CREATE TABLE `player_xp_for_level` (
`lvl` int(3) unsigned NOT NULL,
`xp_for_next_level` int(10) unsigned NOT NULL,
PRIMARY KEY (`lvl`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `player_xp_for_level`
--
LOCK TABLES `player_xp_for_level` WRITE;
/*!40000 ALTER TABLE `player_xp_for_level` DISABLE KEYS */;
INSERT INTO `player_xp_for_level` VALUES
('1', '400'),
('2', '900'),
('3', '1400'),
('4', '2100'),
('5', '2800'),
('6', '3600'),
('7', '4500'),
('8', '5400'),
('9', '6500'),
('10', '7600'),
('11', '8700'),
('12', '9800'),
('13', '11000'),
('14', '12300'),
('15', '13600'),
('16', '15000'),
('17', '16400'),
('18', '17800'),
('19', '19300'),
('20', '20800'),
('21', '22400'),
('22', '24000'),
('23', '25500'),
('24', '27200'),
('25', '28900'),
('26', '30500'),
('27', '32200'),
('28', '33900'),
('29', '36300'),
('30', '38800'),
('31', '41600'),
('32', '44600'),
('33', '48000'),
('34', '51400'),
('35', '55000'),
('36', '58700'),
('37', '62400'),
('38', '66200'),
('39', '70200'),
('40', '74300'),
('41', '78500'),
('42', '82800'),
('43', '87100'),
('44', '91600'),
('45', '96300'),
('46', '101000'),
('47', '105800'),
('48', '110700'),
('49', '115700'),
('50', '120900'),
('51', '126100'),
('52', '131500'),
('53', '137000'),
('54', '142500'),
('55', '148200'),
('56', '154000'),
('57', '159900'),
('58', '165800'),
('59', '172000'),
('60', '290000'),
('61', '317000'),
('62', '349000'),
('63', '386000'),
('64', '428000'),
('65', '475000'),
('66', '527000'),
('67', '585000'),
('68', '648000'),
('69', '717000'),
('70', '1523800'),
('71', '1539600'),
('72', '1555700'),
('73', '1571800'),
('74', '1587900'),
('75', '1604200'),
('76', '1620700'),
('77', '1637400'),
('78', '1653900'),
('79', '1670800');
/*!40000 ALTER TABLE `player_xp_for_level` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `playercreateinfo`
--
@@ -0,0 +1,93 @@
ALTER TABLE db_version CHANGE COLUMN required_7078_01_mangos_spell_proc_event required_7092_01_mangos_player_xp_for_level bit;
DROP TABLE IF EXISTS `player_xp_for_level`;
CREATE TABLE `player_xp_for_level` (
`lvl` int(3) unsigned NOT NULL,
`xp_for_next_level` int(10) unsigned NOT NULL,
PRIMARY KEY (`lvl`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `player_xp_for_level`
--
INSERT INTO `player_xp_for_level` VALUES
('1', '400'),
('2', '900'),
('3', '1400'),
('4', '2100'),
('5', '2800'),
('6', '3600'),
('7', '4500'),
('8', '5400'),
('9', '6500'),
('10', '7600'),
('11', '8700'),
('12', '9800'),
('13', '11000'),
('14', '12300'),
('15', '13600'),
('16', '15000'),
('17', '16400'),
('18', '17800'),
('19', '19300'),
('20', '20800'),
('21', '22400'),
('22', '24000'),
('23', '25500'),
('24', '27200'),
('25', '28900'),
('26', '30500'),
('27', '32200'),
('28', '33900'),
('29', '36300'),
('30', '38800'),
('31', '41600'),
('32', '44600'),
('33', '48000'),
('34', '51400'),
('35', '55000'),
('36', '58700'),
('37', '62400'),
('38', '66200'),
('39', '70200'),
('40', '74300'),
('41', '78500'),
('42', '82800'),
('43', '87100'),
('44', '91600'),
('45', '96300'),
('46', '101000'),
('47', '105800'),
('48', '110700'),
('49', '115700'),
('50', '120900'),
('51', '126100'),
('52', '131500'),
('53', '137000'),
('54', '142500'),
('55', '148200'),
('56', '154000'),
('57', '159900'),
('58', '165800'),
('59', '172000'),
('60', '290000'),
('61', '317000'),
('62', '349000'),
('63', '386000'),
('64', '428000'),
('65', '475000'),
('66', '527000'),
('67', '585000'),
('68', '648000'),
('69', '717000'),
('70', '1523800'),
('71', '1539600'),
('72', '1555700'),
('73', '1571800'),
('74', '1587900'),
('75', '1604200'),
('76', '1620700'),
('77', '1637400'),
('78', '1653900'),
('79', '1670800');
-60
View File
@@ -118,66 +118,6 @@ namespace Trinity
return (uint32)(xp_gain*sWorld.getRate(RATE_XP_KILL));
}
inline uint32 xp_Diff(uint32 lvl)
{
if( lvl < 29 )
return 0;
if( lvl == 29 )
return 1;
if( lvl == 30 )
return 3;
if( lvl == 31 )
return 6;
else
return (5*(lvl-30));
}
inline uint32 mxp(uint32 lvl)
{
if (lvl < 60)
{
return (45 + (5*lvl));
}
else
{
return (235 + (5*lvl));
}
}
inline uint32 xp_to_level(uint32 lvl)
{
uint32 xp = 0;
if (lvl < 60)
{
xp = (8*lvl + xp_Diff(lvl)) * mxp(lvl);
}
else if (lvl == 60)
{
xp = (155 + mxp(lvl) * (1344 - 70 - ((69 - lvl) * (7 + (69 - lvl) * 8 - 1)/2)));
}
else if (lvl < 70)
{
xp = (155 + mxp(lvl) * (1344 - ((69-lvl) * (7 + (69 - lvl) * 8 - 1)/2)));
}else
{
// level higher than 70 is not supported
xp = (uint32)(779700 * (pow(sWorld.getRate(RATE_XP_PAST_70), (int32)lvl - 69)));
return ((xp < 0x7fffffff) ? xp : 0x7fffffff);
}
// The XP to Level is always rounded to the nearest 100 points (50 rounded to high).
xp = ((xp + 50) / 100) * 100; // use additional () for prevent free association operations in C++
if ((lvl > 10) && (lvl < 60)) // compute discount added in 2.3.x
{
uint32 discount = (lvl < 28) ? (lvl - 10) : 18;
xp = (xp * (100 - discount)) / 100; // apply discount
xp = (xp / 100) * 100; // floor to hundreds
}
return xp;
}
inline float xp_in_group_rate(uint32 count, bool isRaid)
{
if(isRaid)
+4 -6
View File
@@ -1114,10 +1114,6 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
CHECK_PACKET_SIZE(recv_data,8*4);
uint64 guids[4];
uint32 GemEnchants[3], OldEnchants[3];
Item *Gems[3];
bool SocketBonusActivated, SocketBonusToBeActivated;
for(int i = 0; i < 4; i++)
recv_data >> guids[i];
@@ -1135,6 +1131,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
//this slot is excepted when applying / removing meta gem bonus
uint8 slot = itemTarget->IsEquipped() ? itemTarget->GetSlot() : NULL_SLOT;
Item *Gems[3];
for(int i = 0; i < 3; i++)
Gems[i] = guids[i + 1] ? _player->GetItemByGuid(guids[i + 1]) : NULL;
@@ -1154,6 +1151,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
return;
}
uint32 GemEnchants[3], OldEnchants[3];
for(int i = 0; i < 3; ++i) //get new and old enchantments
{
GemEnchants[i] = (GemProps[i]) ? GemProps[i]->spellitemenchantement : 0;
@@ -1202,7 +1200,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
}
}
SocketBonusActivated = itemTarget->GemsFitSockets(); //save state of socketbonus
bool SocketBonusActivated = itemTarget->GemsFitSockets(); //save state of socketbonus
_player->ToggleMetaGemsActive(slot, false); //turn off all metagems (except for the target item)
//if a meta gem is being equipped, all information has to be written to the item before testing if the conditions for the gem are met
@@ -1224,7 +1222,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+3; ++enchant_slot)
_player->ApplyEnchantment(itemTarget,EnchantmentSlot(enchant_slot),true);
SocketBonusToBeActivated = itemTarget->GemsFitSockets();//current socketbonus state
bool SocketBonusToBeActivated = itemTarget->GemsFitSockets();//current socketbonus state
if(SocketBonusActivated ^ SocketBonusToBeActivated) //if there was a change...
{
_player->ApplyEnchantment(itemTarget,BONUS_ENCHANTMENT_SLOT,false);
+8 -10
View File
@@ -2043,14 +2043,14 @@ bool ChatHandler::HandleModifyMoneyCommand(const char* args)
return true;
}
//Edit Player field
//Edit Unit field
bool ChatHandler::HandleModifyBitCommand(const char* args)
{
if( !*args )
return false;
Player *chr = getSelectedPlayer();
if (chr == NULL)
Unit *unit = this->getSelectedUnit();
if (!unit)
{
SendSysMessage(LANG_NO_CHAR_SELECTED);
SetSentErrorMessage(true);
@@ -2058,7 +2058,7 @@ bool ChatHandler::HandleModifyBitCommand(const char* args)
}
// check online security
if (HasLowerSecurity(chr, 0))
if (unit->GetTypeId() == TYPEID_PLAYER && HasLowerSecurity((Player *)unit, 0))
return false;
char* pField = strtok((char*)args, " ");
@@ -2072,13 +2072,12 @@ bool ChatHandler::HandleModifyBitCommand(const char* args)
uint16 field = atoi(pField);
uint32 bit = atoi(pBit);
if (field < 1 || field >= PLAYER_END)
if (field < OBJECT_END || field >= unit->GetValuesCount())
{
SendSysMessage(LANG_BAD_VALUE);
SetSentErrorMessage(true);
return false;
}
if (bit < 1 || bit > 32)
{
SendSysMessage(LANG_BAD_VALUE);
@@ -2086,17 +2085,16 @@ bool ChatHandler::HandleModifyBitCommand(const char* args)
return false;
}
if ( chr->HasFlag( field, (1<<(bit-1)) ) )
if ( unit->HasFlag( field, (1<<(bit-1)) ) )
{
chr->RemoveFlag( field, (1<<(bit-1)) );
unit->RemoveFlag( field, (1<<(bit-1)) );
PSendSysMessage(LANG_REMOVE_BIT, bit, field);
}
else
{
chr->SetFlag( field, (1<<(bit-1)) );
unit->SetFlag( field, (1<<(bit-1)) );
PSendSysMessage(LANG_SET_BIT, bit, field);
}
return true;
}
+69 -1
View File
@@ -1695,7 +1695,7 @@ void ObjectMgr::LoadItemPrototypes()
{
if(proto->Class != dbcitem->Class)
{
sLog.outErrorDb("Item (Entry: %u) not correct ñlass %u, must be %u (still using DB value).",i,proto->Class,dbcitem->Class);
sLog.outErrorDb("Item (Entry: %u) not correct class %u, must be %u (still using DB value).",i,proto->Class,dbcitem->Class);
// It safe let use Class from DB
}
/* disabled: have some strange wrong cases for Subclass values.
@@ -2658,6 +2658,67 @@ void ObjectMgr::LoadPlayerInfo()
}
}
}
// Loading xp per level data
{
mPlayerXPperLevel.resize(sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL));
for (uint32 level = 0; level < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL); ++level)
mPlayerXPperLevel[level] = 0;
// 0 1
QueryResult *result = WorldDatabase.Query("SELECT lvl, xp_for_next_level FROM player_xp_for_level");
uint32 count = 0;
if (!result)
{
barGoLink bar( 1 );
sLog.outString();
sLog.outString( ">> Loaded %u xp for level definitions", count );
sLog.outErrorDb( "Error loading `player_xp_for_level` table or empty table.");
exit(1);
}
barGoLink bar( result->GetRowCount() );
do
{
Field* fields = result->Fetch();
uint32 current_level = fields[0].GetUInt32();
uint32 current_xp = fields[1].GetUInt32();
if(current_level >= sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
{
if(current_level > STRONG_MAX_LEVEL) // hardcoded level maximum
sLog.outErrorDb("Wrong (> %u) level %u in `player_xp_for_level` table, ignoring.", STRONG_MAX_LEVEL,current_level);
else
sLog.outDetail("Unused (> MaxPlayerLevel in mangosd.conf) level %u in `player_xp_for_levels` table, ignoring.",current_level);
continue;
}
//PlayerXPperLevel
mPlayerXPperLevel[current_level] = current_xp;
bar.step();
++count;
}
while (result->NextRow());
delete result;
sLog.outString();
sLog.outString( ">> Loaded %u xp for level definitions", count );
}
// fill level gaps
for (uint32 level = 1; level < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL); ++level)
{
if( mPlayerXPperLevel[level] == 0)
{
sLog.outErrorDb("Level %i does not have XP for level data. Using data of level [%i] + 100.",level+1, level);
mPlayerXPperLevel[level] = mPlayerXPperLevel[level-1]+100;
}
}
}
void ObjectMgr::GetPlayerClassLevelInfo(uint32 class_, uint32 level, PlayerClassLevelInfo* info) const
@@ -5885,6 +5946,13 @@ uint32 ObjectMgr::GetBaseXP(uint32 level)
return mBaseXPTable[level] ? mBaseXPTable[level] : 0;
}
uint32 ObjectMgr::GetXPForLevel(uint32 level)
{
if (level < mPlayerXPperLevel.size())
return mPlayerXPperLevel[level];
return 0;
}
void ObjectMgr::LoadPetNames()
{
uint32 count = 0;
+4
View File
@@ -598,6 +598,7 @@ class ObjectMgr
std::string GeneratePetName(uint32 entry);
uint32 GetBaseXP(uint32 level);
uint32 GetXPForLevel(uint32 level);
int32 GetFishingBaseSkillLevel(uint32 entry) const
{
@@ -903,6 +904,9 @@ class ObjectMgr
void BuildPlayerLevelInfo(uint8 race, uint8 class_, uint8 level, PlayerLevelInfo* plinfo) const;
PlayerInfo playerInfo[MAX_RACES][MAX_CLASSES];
typedef std::vector<uint32> PlayerXPperLevel; // [level]
PlayerXPperLevel mPlayerXPperLevel;
typedef std::map<uint32,uint32> BaseXPMap; // [area level][base xp]
BaseXPMap mBaseXPTable;
+3 -3
View File
@@ -709,7 +709,7 @@ void Pet::GivePetXP(uint32 xp)
newXP -= nextLvlXP;
SetLevel( level + 1 );
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32((Trinity::XP::xp_to_level(level+1))/4));
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(level+1)/4);
level = getLevel();
nextLvlXP = GetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP);
@@ -772,7 +772,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
setPowerType(POWER_FOCUS);
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, 0);
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32((Trinity::XP::xp_to_level(creature->getLevel()))/4));
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(creature->getLevel())/4);
SetUInt32Value(UNIT_NPC_FLAGS, 0);
CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(creature->GetCreatureInfo()->family);
@@ -915,7 +915,7 @@ bool Pet::InitStatsForLevel(uint32 petlevel)
}
case HUNTER_PET:
{
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32((Trinity::XP::xp_to_level(petlevel))/4));
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(petlevel)/4);
learnLevelupSpells();
//these formula may not be correct; however, it is designed to be close to what it should be
//this makes dps 0.5 of pets level
+4 -4
View File
@@ -2287,7 +2287,7 @@ void Player::GiveLevel(uint32 level)
GetSession()->SendPacket(&data);
SetUInt32Value(PLAYER_NEXT_LEVEL_XP, Trinity::XP::xp_to_level(level));
SetUInt32Value(PLAYER_NEXT_LEVEL_XP, objmgr.GetXPForLevel(level));
//update level, max level of skills
if(getLevel()!= level)
@@ -2369,7 +2369,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
objmgr.GetPlayerLevelInfo(getRace(),getClass(),getLevel(),&info);
SetUInt32Value(PLAYER_FIELD_MAX_LEVEL, sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL) );
SetUInt32Value(PLAYER_NEXT_LEVEL_XP, Trinity::XP::xp_to_level(getLevel()));
SetUInt32Value(PLAYER_NEXT_LEVEL_XP, objmgr.GetXPForLevel(getLevel()));
UpdateSkillsForLevel ();
@@ -19790,7 +19790,7 @@ void Player::EnterVehicle(Vehicle *vehicle)
vehicle->SetCharmerGUID(GetGUID());
vehicle->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
vehicle->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNKNOWN5);
vehicle->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24);
vehicle->setFaction(getFaction());
SetCharm(vehicle); // charm
@@ -19842,7 +19842,7 @@ void Player::ExitVehicle(Vehicle *vehicle)
{
vehicle->SetCharmerGUID(0);
vehicle->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
vehicle->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNKNOWN5);
vehicle->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24);
vehicle->setFaction((GetTeam() == ALLIANCE) ? vehicle->GetCreatureInfo()->faction_A : vehicle->GetCreatureInfo()->faction_H);
SetCharm(NULL);
+7
View File
@@ -442,6 +442,13 @@ enum PlayerFlags
PLAYER_FLAGS_UNK17 = 0x00010000, // pre-3.0.3 PLAYER_FLAGS_SANCTUARY flag for player entered sanctuary
PLAYER_FLAGS_UNK18 = 0x00020000, // taxi benchmark mode (on/off) (2.0.1)
PLAYER_FLAGS_PVP_TIMER = 0x00040000, // 3.0.2, pvp timer active (after you disable pvp manually)
PLAYER_FLAGS_UNK20 = 0x00080000,
PLAYER_FLAGS_UNK21 = 0x00100000,
PLAYER_FLAGS_UNK22 = 0x00200000,
PLAYER_FLAGS_UNK23 = 0x00400000,
PLAYER_FLAGS_UNK24 = 0x00800000, // disabled all abilitys on tab except autoattack
PLAYER_FLAGS_UNK25 = 0x01000000, // disabled all melee ability on tab include autoattack
};
// used for PLAYER__FIELD_KNOWN_TITLES field (uint64), (1<<bit_index) without (-1)
+6 -6
View File
@@ -260,7 +260,7 @@ enum SpellCategory
#define SPELL_ATTR_EX_NEGATIVE 0x00000080 // 7
#define SPELL_ATTR_EX_NOT_IN_COMBAT_TARGET 0x00000100 // 8 Spell req target not to be in combat state
#define SPELL_ATTR_EX_UNK9 0x00000200 // 9
#define SPELL_ATTR_EX_UNK10 0x00000400 // 10
#define SPELL_ATTR_EX_NO_INITIAL_AGGRO 0x00000400 // 10 no generates threat on cast 100%
#define SPELL_ATTR_EX_UNK11 0x00000800 // 11
#define SPELL_ATTR_EX_UNK12 0x00001000 // 12
#define SPELL_ATTR_EX_UNK13 0x00002000 // 13
@@ -311,7 +311,7 @@ enum SpellCategory
#define SPELL_ATTR_EX2_UNK25 0x02000000 // 25
#define SPELL_ATTR_EX2_UNK26 0x04000000 // 26 unaffected by school immunity
#define SPELL_ATTR_EX2_UNK27 0x08000000 // 27
#define SPELL_ATTR_EX2_UNK28 0x10000000 // 28
#define SPELL_ATTR_EX2_UNK28 0x10000000 // 28 no breaks stealth if it fails??
#define SPELL_ATTR_EX2_CANT_CRIT 0x20000000 // 29 Spell can't crit
#define SPELL_ATTR_EX2_UNK30 0x40000000 // 30
#define SPELL_ATTR_EX2_FOOD 0x80000000 // 31 food, well-fed, and a few others
@@ -332,8 +332,8 @@ enum SpellCategory
#define SPELL_ATTR_EX3_UNK13 0x00002000 // 13
#define SPELL_ATTR_EX3_UNK14 0x00004000 // 14 "Honorless Target" only this spells have this flag
#define SPELL_ATTR_EX3_UNK15 0x00008000 // 15 Auto Shoot, Shoot, Throw, - this is autoshot flag
#define SPELL_ATTR_EX3_UNK16 0x00010000 // 16
#define SPELL_ATTR_EX3_NO_INITIAL_AGGRO 0x00020000 // 17 no initial aggro
#define SPELL_ATTR_EX3_UNK16 0x00010000 // 16 no triggers effects that trigger on casting a spell??
#define SPELL_ATTR_EX3_UNK17 0x00020000 // 17 no triggers effects that trigger on casting a spell??
#define SPELL_ATTR_EX3_UNK18 0x00040000 // 18
#define SPELL_ATTR_EX3_UNK19 0x00080000 // 19
#define SPELL_ATTR_EX3_DEATH_PERSISTENT 0x00100000 // 20 Death persistent spells
@@ -341,7 +341,7 @@ enum SpellCategory
#define SPELL_ATTR_EX3_REQ_WAND 0x00400000 // 22 Req wand
#define SPELL_ATTR_EX3_UNK23 0x00800000 // 23
#define SPELL_ATTR_EX3_REQ_OFFHAND 0x01000000 // 24 Req offhand weapon
#define SPELL_ATTR_EX3_UNK25 0x02000000 // 25
#define SPELL_ATTR_EX3_UNK25 0x02000000 // 25 no cause spell pushback ?
#define SPELL_ATTR_EX3_UNK26 0x04000000 // 26
#define SPELL_ATTR_EX3_UNK27 0x08000000 // 27
#define SPELL_ATTR_EX3_UNK28 0x10000000 // 28
@@ -353,7 +353,7 @@ enum SpellCategory
#define SPELL_ATTR_EX4_UNK1 0x00000002 // 1 proc on finishing move?
#define SPELL_ATTR_EX4_UNK2 0x00000004 // 2
#define SPELL_ATTR_EX4_UNK3 0x00000008 // 3
#define SPELL_ATTR_EX4_UNK4 0x00000010 // 4
#define SPELL_ATTR_EX4_UNK4 0x00000010 // 4 This will no longer cause guards to attack on use??
#define SPELL_ATTR_EX4_UNK5 0x00000020 // 5
#define SPELL_ATTR_EX4_UNK6 0x00000040 // 6
#define SPELL_ATTR_EX4_UNK7 0x00000080 // 7
+2 -2
View File
@@ -1014,7 +1014,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
if( !m_caster->IsFriendlyTo(unit) && !IsPositiveSpell(m_spellInfo->Id))
{
if( !(m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_NO_INITIAL_AGGRO) )
if( !(m_spellInfo->AttributesEx & SPELL_ATTR_EX_NO_INITIAL_AGGRO) )
{
m_caster->CombatStart(unit);
}
@@ -1089,7 +1089,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
// assisting case, healing and resurrection
if(unit->hasUnitState(UNIT_STAT_ATTACK_PLAYER))
m_caster->SetContestedPvP();
if( unit->isInCombat() && !(m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_NO_INITIAL_AGGRO) )
if( unit->isInCombat() && !(m_spellInfo->AttributesEx & SPELL_ATTR_EX_NO_INITIAL_AGGRO) )
{
m_caster->SetInCombatState(unit->GetCombatTimer() > 0);
unit->getHostilRefManager().threatAssist(m_caster, 0.0f);
+4 -4
View File
@@ -3045,9 +3045,9 @@ void Aura::HandleModPossessPet(bool apply, bool Real)
return;
if(apply)
pet->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNKNOWN5);
pet->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24);
else
pet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNKNOWN5);
pet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24);
((Player*)caster)->SetFarSight(apply ? pet->GetGUID() : NULL);
((Player*)caster)->SetCharm(apply ? pet : NULL);
@@ -3229,7 +3229,7 @@ void Aura::HandleFeignDeath(bool apply, bool Real)
}
}
// blizz like 2.0.x
m_target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNKNOWN6);
m_target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_29);
// blizz like 2.0.x
m_target->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
// blizz like 2.0.x
@@ -3254,7 +3254,7 @@ void Aura::HandleFeignDeath(bool apply, bool Real)
m_target->SendMessageToSet(&data,true);
*/
// blizz like 2.0.x
m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNKNOWN6);
m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_29);
// blizz like 2.0.x
m_target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
// blizz like 2.0.x
+26 -27
View File
@@ -3889,35 +3889,34 @@ void Spell::EffectEnchantItemPerm(uint32 i)
p_caster->UpdateCraftSkill(m_spellInfo->Id);
if (m_spellInfo->EffectMiscValue[i])
uint32 enchant_id = m_spellInfo->EffectMiscValue[i];
if (!enchant_id)
return;
SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
if(!pEnchant)
return;
// item can be in trade slot and have owner diff. from caster
Player* item_owner = itemTarget->GetOwner();
if(!item_owner)
return;
if(item_owner!=p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
{
uint32 enchant_id = m_spellInfo->EffectMiscValue[i];
SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id);
if(!pEnchant)
return;
// item can be in trade slot and have owner diff. from caster
Player* item_owner = itemTarget->GetOwner();
if(!item_owner)
return;
if(item_owner!=p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
{
sLog.outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)",
p_caster->GetName(),p_caster->GetSession()->GetAccountId(),
itemTarget->GetProto()->Name1,itemTarget->GetEntry(),
item_owner->GetName(),item_owner->GetSession()->GetAccountId());
}
// remove old enchanting before applying new if equipped
item_owner->ApplyEnchantment(itemTarget,PERM_ENCHANTMENT_SLOT,false);
itemTarget->SetEnchantment(PERM_ENCHANTMENT_SLOT, enchant_id, 0, 0);
// add new enchanting if equipped
item_owner->ApplyEnchantment(itemTarget,PERM_ENCHANTMENT_SLOT,true);
sLog.outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)",
p_caster->GetName(),p_caster->GetSession()->GetAccountId(),
itemTarget->GetProto()->Name1,itemTarget->GetEntry(),
item_owner->GetName(),item_owner->GetSession()->GetAccountId());
}
// remove old enchanting before applying new if equipped
item_owner->ApplyEnchantment(itemTarget,PERM_ENCHANTMENT_SLOT,false);
itemTarget->SetEnchantment(PERM_ENCHANTMENT_SLOT, enchant_id, 0, 0);
// add new enchanting if equipped
item_owner->ApplyEnchantment(itemTarget,PERM_ENCHANTMENT_SLOT,true);
}
void Spell::EffectEnchantItemTmp(uint32 i)
+12 -10
View File
@@ -468,23 +468,23 @@ enum UnitVisibility
// Value masks for UNIT_FIELD_FLAGS
enum UnitFlags
{
UNIT_FLAG_UNKNOWN7 = 0x00000001,
UNIT_FLAG_UNK_0 = 0x00000001,
UNIT_FLAG_NON_ATTACKABLE = 0x00000002, // not attackable
UNIT_FLAG_DISABLE_MOVE = 0x00000004,
UNIT_FLAG_PVP_ATTACKABLE = 0x00000008, // allow apply pvp rules to attackable state in addition to faction dependent state
UNIT_FLAG_RENAME = 0x00000010,
UNIT_FLAG_PREPARATION = 0x00000020, // don't take reagents for spells with SPELL_ATTR_EX5_NO_REAGENT_WHILE_PREP
UNIT_FLAG_UNKNOWN9 = 0x00000040,
UNIT_FLAG_UNK_6 = 0x00000040,
UNIT_FLAG_NOT_ATTACKABLE_1 = 0x00000080, // ?? (UNIT_FLAG_PVP_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1) is NON_PVP_ATTACKABLE
UNIT_FLAG_NOT_ATTACKABLE_2 = 0x00000100, // 2.0.8
UNIT_FLAG_UNKNOWN11 = 0x00000200, // 3.0.3 - makes you unable to attack everything
UNIT_FLAG_UNK_9 = 0x00000200, // 3.0.3 - makes you unable to attack everything
UNIT_FLAG_LOOTING = 0x00000400, // loot animation
UNIT_FLAG_PET_IN_COMBAT = 0x00000800, // in combat?, 2.0.8
UNIT_FLAG_PVP = 0x00001000, // changed in 3.0.3
UNIT_FLAG_SILENCED = 0x00002000, // silenced, 2.1.1
UNIT_FLAG_UNKNOWN4 = 0x00004000, // 2.0.8
UNIT_FLAG_UNKNOWN13 = 0x00008000,
UNIT_FLAG_UNKNOWN14 = 0x00010000,
UNIT_FLAG_UNK_14 = 0x00004000, // 2.0.8
UNIT_FLAG_UNK_15 = 0x00008000,
UNIT_FLAG_UNK_16 = 0x00010000,
UNIT_FLAG_PACIFIED = 0x00020000, // 3.0.3 ok
UNIT_FLAG_STUNNED = 0x00040000, // 3.0.3 ok
UNIT_FLAG_IN_COMBAT = 0x00080000,
@@ -492,19 +492,21 @@ enum UnitFlags
UNIT_FLAG_DISARMED = 0x00200000, // 3.0.3, disable melee spells casting..., "Required melee weapon" added to melee spells tooltip.
UNIT_FLAG_CONFUSED = 0x00400000,
UNIT_FLAG_FLEEING = 0x00800000,
UNIT_FLAG_UNKNOWN5 = 0x01000000, // used in spell Eyes of the Beast for pet...
UNIT_FLAG_UNK_24 = 0x01000000, // used in spell Eyes of the Beast for pet...
UNIT_FLAG_NOT_SELECTABLE = 0x02000000,
UNIT_FLAG_SKINNABLE = 0x04000000,
UNIT_FLAG_MOUNT = 0x08000000,
UNIT_FLAG_UNKNOWN17 = 0x10000000,
UNIT_FLAG_UNKNOWN6 = 0x20000000, // used in Feing Death spell
UNIT_FLAG_SHEATHE = 0x40000000
UNIT_FLAG_UNK_28 = 0x10000000,
UNIT_FLAG_UNK_29 = 0x20000000, // used in Feing Death spell
UNIT_FLAG_SHEATHE = 0x40000000,
UNIT_FLAG_UNK_31 = 0x80000000
};
// Value masks for UNIT_FIELD_FLAGS_2
enum UnitFlags2
{
UNIT_FLAG2_FEIGN_DEATH = 0x00000001,
UNIT_FLAG2_UNK1 = 0x00000002, // Hide unit model (show only player equip)
UNIT_FLAG2_COMPREHEND_LANG = 0x00000008,
UNIT_FLAG2_FORCE_MOVE = 0x00000040,
UNIT_FLAG2_REGENERATE_POWER = 0x00000800
-1
View File
@@ -456,7 +456,6 @@ void World::LoadConfigSettings(bool reload)
rate_values[RATE_XP_KILL] = sConfig.GetFloatDefault("Rate.XP.Kill", 1.0f);
rate_values[RATE_XP_QUEST] = sConfig.GetFloatDefault("Rate.XP.Quest", 1.0f);
rate_values[RATE_XP_EXPLORE] = sConfig.GetFloatDefault("Rate.XP.Explore", 1.0f);
rate_values[RATE_XP_PAST_70] = sConfig.GetFloatDefault("Rate.XP.PastLevel70", 1.0f);
rate_values[RATE_REPUTATION_GAIN] = sConfig.GetFloatDefault("Rate.Reputation.Gain", 1.0f);
rate_values[RATE_CREATURE_NORMAL_DAMAGE] = sConfig.GetFloatDefault("Rate.Creature.Normal.Damage", 1.0f);
rate_values[RATE_CREATURE_ELITE_ELITE_DAMAGE] = sConfig.GetFloatDefault("Rate.Creature.Elite.Elite.Damage", 1.0f);
-1
View File
@@ -236,7 +236,6 @@ enum Rates
RATE_XP_KILL,
RATE_XP_QUEST,
RATE_XP_EXPLORE,
RATE_XP_PAST_70,
RATE_REPUTATION_GAIN,
RATE_CREATURE_NORMAL_HP,
RATE_CREATURE_ELITE_ELITE_HP,
-5
View File
@@ -994,10 +994,6 @@ Visibility.Distance.Grey.Object = 10
# XP rates
# Default: 1
#
# Rate.XP.PastLevel70
# XP needed per level past 70 (Rates below 1 not recommended)
# Default: 1
#
# Rate.Rest.InGame
# Rate.Rest.Offline.InTavernOrCity
# Rate.Rest.Offline.InWilderness
@@ -1107,7 +1103,6 @@ Rate.Drop.Money = 1
Rate.XP.Kill = 1
Rate.XP.Quest = 1
Rate.XP.Explore = 1
Rate.XP.PastLevel70 = 1
Rate.Rest.InGame = 1
Rate.Rest.Offline.InTavernOrCity = 1
Rate.Rest.Offline.InWilderness = 1
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7090"
#define REVISION_NR "7092"
#endif // __REVISION_NR_H__