mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
Small fixes.
This commit is contained in:
parent
d739502fcc
commit
b5548f9f12
6 changed files with 60 additions and 55 deletions
|
|
@ -2,8 +2,8 @@ CREATE TABLE `character_equipmentsets` (
|
||||||
`guid` int(11) NOT NULL default '0',
|
`guid` int(11) NOT NULL default '0',
|
||||||
`setguid` bigint(20) NOT NULL auto_increment,
|
`setguid` bigint(20) NOT NULL auto_increment,
|
||||||
`setindex` tinyint(4) NOT NULL default '0',
|
`setindex` tinyint(4) NOT NULL default '0',
|
||||||
`name` varchar(30) NOT NULL,
|
`name` varchar(100) NOT NULL,
|
||||||
`iconname` varchar(30) NOT NULL,
|
`iconname` varchar(100) NOT NULL,
|
||||||
`item0` int(11) NOT NULL default '0',
|
`item0` int(11) NOT NULL default '0',
|
||||||
`item1` int(11) NOT NULL default '0',
|
`item1` int(11) NOT NULL default '0',
|
||||||
`item2` int(11) NOT NULL default '0',
|
`item2` int(11) NOT NULL default '0',
|
||||||
|
|
|
||||||
|
|
@ -1512,7 +1512,7 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// titles
|
// titles
|
||||||
if(uint32 titleId = reward->titleId[GetPlayer()->GetTeam() == HORDE?0:1])
|
if(uint32 titleId = reward->titleId[GetPlayer()->GetTeam() == HORDE ? 0 : 1])
|
||||||
{
|
{
|
||||||
if(CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(titleId))
|
if(CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(titleId))
|
||||||
GetPlayer()->SetTitle(titleEntry);
|
GetPlayer()->SetTitle(titleEntry);
|
||||||
|
|
|
||||||
|
|
@ -696,7 +696,7 @@ bool ChatHandler::HandleModifyKnownTitlesCommand(const char* args)
|
||||||
|
|
||||||
uint64 titles2 = titles;
|
uint64 titles2 = titles;
|
||||||
|
|
||||||
for(int i=1; i < sCharTitlesStore.GetNumRows(); ++i)
|
for(int i = 1; i < sCharTitlesStore.GetNumRows(); ++i)
|
||||||
if(CharTitlesEntry const* tEntry = sCharTitlesStore.LookupEntry(i))
|
if(CharTitlesEntry const* tEntry = sCharTitlesStore.LookupEntry(i))
|
||||||
titles2 &= ~(uint64(1) << tEntry->bit_index);
|
titles2 &= ~(uint64(1) << tEntry->bit_index);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1422,7 +1422,7 @@ void WorldSession::HandleChooseTitleOpcode( WorldPacket & recv_data )
|
||||||
recv_data >> title;
|
recv_data >> title;
|
||||||
|
|
||||||
// -1 at none
|
// -1 at none
|
||||||
if(title > 0 && title < 128)
|
if(title > 0 && title < 192)
|
||||||
{
|
{
|
||||||
if(!GetPlayer()->HasTitle(title))
|
if(!GetPlayer()->HasTitle(title))
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -593,6 +593,7 @@ bool Player::Create( uint32 guidlow, const std::string& name, uint8 race, uint8
|
||||||
|
|
||||||
SetUInt64Value( PLAYER__FIELD_KNOWN_TITLES, 0 ); // 0=disabled
|
SetUInt64Value( PLAYER__FIELD_KNOWN_TITLES, 0 ); // 0=disabled
|
||||||
SetUInt64Value( PLAYER__FIELD_KNOWN_TITLES1, 0 ); // 0=disabled
|
SetUInt64Value( PLAYER__FIELD_KNOWN_TITLES1, 0 ); // 0=disabled
|
||||||
|
SetUInt64Value( PLAYER__FIELD_KNOWN_TITLES2, 0 ); // 0=disabled
|
||||||
SetUInt32Value( PLAYER_CHOSEN_TITLE, 0 );
|
SetUInt32Value( PLAYER_CHOSEN_TITLE, 0 );
|
||||||
SetUInt32Value( PLAYER_FIELD_KILLS, 0 );
|
SetUInt32Value( PLAYER_FIELD_KILLS, 0 );
|
||||||
SetUInt32Value( PLAYER_FIELD_LIFETIME_HONORBALE_KILLS, 0 );
|
SetUInt32Value( PLAYER_FIELD_LIFETIME_HONORBALE_KILLS, 0 );
|
||||||
|
|
@ -14189,7 +14190,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
||||||
if(uint32 curTitle = GetUInt32Value(PLAYER_CHOSEN_TITLE))
|
if(uint32 curTitle = GetUInt32Value(PLAYER_CHOSEN_TITLE))
|
||||||
{
|
{
|
||||||
if(!HasTitle(curTitle))
|
if(!HasTitle(curTitle))
|
||||||
SetUInt32Value(PLAYER_CHOSEN_TITLE,0);
|
SetUInt32Value(PLAYER_CHOSEN_TITLE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not finish taxi flight path
|
// Not finish taxi flight path
|
||||||
|
|
@ -19252,19 +19253,19 @@ bool Player::isTotalImmune()
|
||||||
|
|
||||||
bool Player::HasTitle(uint32 bitIndex)
|
bool Player::HasTitle(uint32 bitIndex)
|
||||||
{
|
{
|
||||||
if (bitIndex > 128)
|
if (bitIndex > 192)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
uint32 fieldIndexOffset = bitIndex/32;
|
uint32 fieldIndexOffset = bitIndex / 32;
|
||||||
uint32 flag = 1 << (bitIndex%32);
|
uint32 flag = 1 << (bitIndex % 32);
|
||||||
return HasFlag(PLAYER__FIELD_KNOWN_TITLES+fieldIndexOffset, flag);
|
return HasFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::SetTitle(CharTitlesEntry const* title)
|
void Player::SetTitle(CharTitlesEntry const* title)
|
||||||
{
|
{
|
||||||
uint32 fieldIndexOffset = title->bit_index/32;
|
uint32 fieldIndexOffset = title->bit_index / 32;
|
||||||
uint32 flag = 1 << (title->bit_index%32);
|
uint32 flag = 1 << (title->bit_index % 32);
|
||||||
SetFlag(PLAYER__FIELD_KNOWN_TITLES+fieldIndexOffset, flag);
|
SetFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::ConvertRune(uint8 index, uint8 newType)
|
void Player::ConvertRune(uint8 index, uint8 newType)
|
||||||
|
|
@ -19893,10 +19894,13 @@ void Player::BuildPlayerTalentsInfoData(WorldPacket *data)
|
||||||
{
|
{
|
||||||
*data << uint32(GetFreeTalentPoints()); // unspentTalentPoints
|
*data << uint32(GetFreeTalentPoints()); // unspentTalentPoints
|
||||||
uint8 talentGroupCount = 1;
|
uint8 talentGroupCount = 1;
|
||||||
*data << uint8(talentGroupCount); // talent group count (1 or 2)
|
*data << uint8(talentGroupCount); // talent group count (0, 1 or 2)
|
||||||
*data << uint8(0); // talent group index (0 or 1)
|
*data << uint8(0); // talent group index (0 or 1)
|
||||||
|
|
||||||
if(talentGroupCount)
|
if(talentGroupCount)
|
||||||
|
{
|
||||||
|
// loop through all specs (only 1 for now)
|
||||||
|
for(uint32 groups = 0; groups < talentGroupCount; ++groups)
|
||||||
{
|
{
|
||||||
uint8 talentIdCount = 0;
|
uint8 talentIdCount = 0;
|
||||||
size_t pos = data->wpos();
|
size_t pos = data->wpos();
|
||||||
|
|
@ -19948,6 +19952,7 @@ void Player::BuildPlayerTalentsInfoData(WorldPacket *data)
|
||||||
for(uint8 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i)
|
for(uint8 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i)
|
||||||
*data << uint16(GetGlyph(i)); // GlyphProperties.dbc
|
*data << uint16(GetGlyph(i)); // GlyphProperties.dbc
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::BuildPetTalentsInfoData(WorldPacket *data)
|
void Player::BuildPetTalentsInfoData(WorldPacket *data)
|
||||||
|
|
|
||||||
|
|
@ -1390,7 +1390,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
uint32 GetGlyph(uint8 slot) { return GetUInt32Value(PLAYER_FIELD_GLYPHS_1 + slot); }
|
uint32 GetGlyph(uint8 slot) { return GetUInt32Value(PLAYER_FIELD_GLYPHS_1 + slot); }
|
||||||
|
|
||||||
uint32 GetFreePrimaryProffesionPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS2); }
|
uint32 GetFreePrimaryProffesionPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS2); }
|
||||||
void SetFreePrimaryProffesions(uint16 profs) { SetUInt32Value(PLAYER_CHARACTER_POINTS2,profs); }
|
void SetFreePrimaryProffesions(uint16 profs) { SetUInt32Value(PLAYER_CHARACTER_POINTS2, profs); }
|
||||||
void InitPrimaryProffesions();
|
void InitPrimaryProffesions();
|
||||||
|
|
||||||
PlayerSpellMap const& GetSpellMap() const { return m_spells; }
|
PlayerSpellMap const& GetSpellMap() const { return m_spells; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue