diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/BattleGroundHandler.cpp | 6 | ||||
-rw-r--r-- | src/game/BattleGroundMgr.cpp | 125 | ||||
-rw-r--r-- | src/game/BattleGroundMgr.h | 1 | ||||
-rw-r--r-- | src/game/GroupHandler.cpp | 1 | ||||
-rw-r--r-- | src/game/Language.h | 34 | ||||
-rw-r--r-- | src/game/Pet.cpp | 3 | ||||
-rw-r--r-- | src/game/Pet.h | 2 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 7 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 11 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 8 | ||||
-rw-r--r-- | src/game/Unit.cpp | 24 | ||||
-rw-r--r-- | src/game/World.cpp | 3 | ||||
-rw-r--r-- | src/game/World.h | 1 | ||||
-rw-r--r-- | src/mangosd/mangosd.conf.dist.in | 15 | ||||
-rw-r--r-- | src/shared/revision_nr.h | 2 |
15 files changed, 182 insertions, 61 deletions
diff --git a/src/game/BattleGroundHandler.cpp b/src/game/BattleGroundHandler.cpp index fc99fe3f1fe..4cdef6eebac 100644 --- a/src/game/BattleGroundHandler.cpp +++ b/src/game/BattleGroundHandler.cpp @@ -180,6 +180,8 @@ void WorldSession::HandleBattleGroundJoinOpcode( WorldPacket & recv_data ) } sLog.outDebug("Battleground: group end"); sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].Update(bgTypeId, _player->GetBattleGroundQueueIdFromLevel()); + if(!ginfo->IsInvitedToBGInstanceGUID) + sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].AnnounceWorld(ginfo, _player->GetGUID(), true); } else { @@ -196,6 +198,8 @@ void WorldSession::HandleBattleGroundJoinOpcode( WorldPacket & recv_data ) GroupQueueInfo * ginfo = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].AddGroup(_player, bgTypeId, 0, false, 0); sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].AddPlayer(_player, ginfo); sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].Update(bgTypeId, _player->GetBattleGroundQueueIdFromLevel()); + if(!ginfo->IsInvitedToBGInstanceGUID) + sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].AnnounceWorld(ginfo, _player->GetGUID(), true); sLog.outDebug("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName()); } } @@ -784,6 +788,8 @@ void WorldSession::HandleBattleGroundArenaJoin( WorldPacket & recv_data ) } sLog.outDebug("Battleground: arena join as group end"); sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].Update(bgTypeId, _player->GetBattleGroundQueueIdFromLevel(), arenatype, isRated, arenaRating); + if(isRated) + sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].AnnounceWorld(ginfo, _player->GetGUID(), true); } else { diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index de525ae209d..2b904ba6850 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -243,38 +243,6 @@ void BattleGroundQueue::AddPlayer(Player *plr, GroupQueueInfo *ginfo) // add the pinfo to ginfo's list ginfo->Players[plr->GetGUID()] = &info; -/* - if( sWorld.getConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE) ) - { - BattleGround* bg = sBattleGroundMgr.GetBattleGround(bgTypeId); - char const* bgName = bg->GetName(); - - uint32 q_min_level = Player::GetMinLevelForBattleGroundQueueId(queue_id); - uint32 q_max_level = Player::GetMaxLevelForBattleGroundQueueId(queue_id); - - // replace hardcoded max level by player max level for nice output - if(q_max_level > sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL)) - q_max_level = sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL); - - int8 MinPlayers = bg->GetMinPlayersPerTeam(); - - uint8 qHorde = m_QueuedPlayers[queue_id].Horde; - uint8 qAlliance = m_QueuedPlayers[queue_id].Alliance; - - // Show queue status to player only (when joining queue) - if(sWorld.getConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY)) - { - ChatHandler(plr).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, - bgName, q_min_level, q_max_level, qAlliance, (MinPlayers > qAlliance) ? (MinPlayers - qAlliance) : 0, qHorde, (MinPlayers > qHorde) ? (MinPlayers - qHorde) : 0); - } - // System message - else - { - sWorld.SendWorldText(LANG_BG_QUEUE_ANNOUNCE_WORLD, - bgName, q_min_level, q_max_level, qAlliance, (MinPlayers > qAlliance) ? (MinPlayers - qAlliance) : 0, qHorde, (MinPlayers > qHorde) ? (MinPlayers - qHorde) : 0); - } - - }*/ } void BattleGroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount) @@ -360,6 +328,11 @@ void BattleGroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount) // remove player queue info m_QueuedPlayers[queue_id].erase(itr); // remove group queue info if needed + + //if we left BG queue(not porting) OR if arena team left queue for rated match + if((decreaseInvitedCount && !group->ArenaType) || (group->ArenaType && group->IsRated && group->Players.empty())) + AnnounceWorld(group, guid, false); + if(group->Players.empty()) { m_QueuedGroups[queue_id].erase(group_itr); @@ -388,6 +361,85 @@ void BattleGroundQueue::RemovePlayer(uint64 guid, bool decreaseInvitedCount) } } +void BattleGroundQueue::AnnounceWorld(GroupQueueInfo *ginfo, uint64 playerGUID, bool isAddedToQueue) +{ + + if(ginfo->ArenaType) //if Arena + { + if( sWorld.getConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE) && ginfo->IsRated) + { + BattleGround* bg = sBattleGroundMgr.GetBattleGroundTemplate(ginfo->BgTypeId); + if(!bg) + return; + + char const* bgName = bg->GetName(); + if(isAddedToQueue) + sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, bgName, ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating); + else + sWorld.SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, bgName, ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating); + } + } + else //if BG + { + if( sWorld.getConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE) ) + { + Player *plr = objmgr.GetPlayer(playerGUID); + if(!plr) + return; + + BattleGround* bg = sBattleGroundMgr.GetBattleGroundTemplate(ginfo->BgTypeId); + if(!bg) + return; + + uint32 queue_id = plr->GetBattleGroundQueueIdFromLevel(); + char const* bgName = bg->GetName(); + + uint32 q_min_level = Player::GetMinLevelForBattleGroundQueueId(queue_id); + uint32 q_max_level = Player::GetMaxLevelForBattleGroundQueueId(queue_id); + + // replace hardcoded max level by player max level for nice output + if(q_max_level > sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL)) + q_max_level = sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL); + + int8 MinPlayers = bg->GetMinPlayersPerTeam(); + + uint8 qHorde = 0; + uint8 qAlliance = 0; + + uint32 bgTypeId = ginfo->BgTypeId; + QueuedPlayersMap::iterator itr; + for(itr = m_QueuedPlayers[queue_id].begin(); itr!= m_QueuedPlayers[queue_id].end(); ++itr) + { + if(itr->second.GroupInfo->BgTypeId == bgTypeId) + { + switch(itr->second.GroupInfo->Team) + { + case HORDE: + qHorde++; break; + case ALLIANCE: + qAlliance++; break; + default: + break; + } + } + } + + // Show queue status to player only (when joining queue) + if(sWorld.getConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY)) + { + ChatHandler(plr).PSendSysMessage(LANG_BG_QUEUE_ANNOUNCE_SELF, + bgName, q_min_level, q_max_level, qAlliance, MinPlayers, qHorde, MinPlayers); + } + // System message + else + { + sWorld.SendWorldText(LANG_BG_QUEUE_ANNOUNCE_WORLD, + bgName, q_min_level, q_max_level, qAlliance, MinPlayers, qHorde, MinPlayers); + } + } + } +} + bool BattleGroundQueue::InviteGroupToBG(GroupQueueInfo * ginfo, BattleGround * bg, uint32 side) { // set side if needed @@ -715,6 +767,15 @@ void BattleGroundQueue::Update(uint32 bgTypeId, uint32 queue_id, uint8 arenatype { // create new battleground bg2 = sBattleGroundMgr.CreateNewBattleGround(bgTypeId); + if( sWorld.getConfig(CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE) ) + { + char const* bgName = bg2->GetName(); + uint32 q_min_level = Player::GetMinLevelForBattleGroundQueueId(queue_id); + uint32 q_max_level = Player::GetMaxLevelForBattleGroundQueueId(queue_id); + if(q_max_level > sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL)) + q_max_level = sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL); + sWorld.SendWorldText(LANG_BG_STARTED_ANNOUNCE_WORLD, bgName, q_min_level, q_max_level); + } } if(!bg2) diff --git a/src/game/BattleGroundMgr.h b/src/game/BattleGroundMgr.h index 7ca3efed59b..faf6196979d 100644 --- a/src/game/BattleGroundMgr.h +++ b/src/game/BattleGroundMgr.h @@ -77,6 +77,7 @@ class BattleGroundQueue void RemovePlayer(uint64 guid, bool decreaseInvitedCount); void DecreaseGroupLength(uint32 queueId, uint32 AsGroup); void BGEndedRemoveInvites(BattleGround * bg); + void AnnounceWorld(GroupQueueInfo *ginfo, uint64 playerGUID, bool isAddedToQueue); typedef std::map<uint64, PlayerQueueInfo> QueuedPlayersMap; QueuedPlayersMap m_QueuedPlayers[MAX_BATTLEGROUND_QUEUES]; diff --git a/src/game/GroupHandler.cpp b/src/game/GroupHandler.cpp index 7a4f0a2720c..9f807c2b525 100644 --- a/src/game/GroupHandler.cpp +++ b/src/game/GroupHandler.cpp @@ -162,6 +162,7 @@ void WorldSession::HandleGroupInviteOpcode( WorldPacket & recv_data ) // ok, we do it WorldPacket data(SMSG_GROUP_INVITE, 10); // guess size + data << uint8(1); // ok data << GetPlayer()->GetName(); player->GetSession()->SendPacket(&data); diff --git a/src/game/Language.h b/src/game/Language.h index 68106edf8db..0347bf8e676 100644 --- a/src/game/Language.h +++ b/src/game/Language.h @@ -644,14 +644,13 @@ enum TrinityStrings LANG_BG_QUEUE_ANNOUNCE_SELF = 711, LANG_BG_QUEUE_ANNOUNCE_WORLD = 712, - - LANG_YOUR_ARENA_LEVEL_REQ_ERROR = 713, -// LANG_HIS_ARENA_LEVEL_REQ_ERROR = 714, an opcode exists for this +// = 714, not used LANG_YOUR_BG_LEVEL_REQ_ERROR = 715, + // LANG_YOUR_ARENA_TEAM_FULL = 716, an opcode exists for this - LANG_BG_AV_ALLY = 717, + /*LANG_BG_AV_ALLY = 717, LANG_BG_AV_HORDE = 718, LANG_BG_AV_TOWER_TAKEN = 719, LANG_BG_AV_TOWER_ASSAULTED = 720, @@ -678,7 +677,7 @@ enum TrinityStrings LANG_BG_AV_NODE_GRAVE_FROST = 739, LANG_BG_AV_NODE_TOWER_FROST_E = 740, LANG_BG_AV_NODE_TOWER_FROST_W = 741, - LANG_BG_AV_NODE_GRAVE_FROST_HUT = 742, + LANG_BG_AV_NODE_GRAVE_FROST_HUT = 742,*/ LANG_BG_AV_ONEMINTOSTART = 743, LANG_BG_AV_HALFMINTOSTART = 744, @@ -714,6 +713,31 @@ enum TrinityStrings LANG_CANNOT_GO_TO_BG_GM = 1137, // "You must be in GM mode to teleport to a player in a battleground." LANG_CANNOT_GO_TO_BG_FROM_BG = 1138, // "You cannot teleport to a battleground from another battleground. Please leave the current battleground first." +// = 716, not used + LANG_BG_STARTED_ANNOUNCE_WORLD = 717, + LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN= 718, + LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT= 719, + + LANG_BG_GROUP_TOO_LARGE = 720, // "Your group is too large for this battleground. Please regroup to join." + LANG_ARENA_GROUP_TOO_LARGE = 721, // "Your group is too large for this arena. Please regroup to join." + LANG_ARENA_YOUR_TEAM_ONLY = 722, // "Your group has members not in your arena team. Please regroup to join." + LANG_ARENA_NOT_ENOUGH_PLAYERS = 723, // "Your group does not have enough players to join this match." + LANG_ARENA_GOLD_WINS = 724, // "The Gold Team wins!" + LANG_ARENA_GREEN_WINS = 725, // "The Green Team wins!" + LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING = 726, // The battleground will end soon, because there aren't enough players. Get more ppl or win already! + LANG_BG_GROUP_OFFLINE_MEMBER = 727, // "Your group has an offline member. Please remove him before joining." + LANG_BG_GROUP_MIXED_FACTION = 728, // "Your group has players from the opposing faction. You can't join the battleground as a group." + LANG_BG_GROUP_MIXED_LEVELS = 729, // "Your group has players from different battleground brakets. You can't join as group." + LANG_BG_GROUP_MEMBER_ALREADY_IN_QUEUE = 730, // "Someone in your party is already in this battleground queue. (S)he must leave it before joining as group." + LANG_BG_GROUP_MEMBER_DESERTER = 731, // "Someone in your party is Deserter. You can't join as group." + LANG_BG_GROUP_MEMBER_NO_FREE_QUEUE_SLOTS = 732, // "Someone in your party is already in three battleground queues. You cannot join as group." + + LANG_CANNOT_TELE_TO_BG = 733, // "You cannot teleport to a battleground or arena map." + LANG_CANNOT_SUMMON_TO_BG = 734, // "You cannot summon players to a battleground or arena map." + LANG_CANNOT_GO_TO_BG_GM = 735, // "You must be in GM mode to teleport to a player in a battleground." + LANG_CANNOT_GO_TO_BG_FROM_BG = 736, // "You cannot teleport to a battleground from another battleground. Please leave the current battleground first." + // Room for batleground/arena strings 737-799 not used + // in game strings LANG_PET_INVALID_NAME = 800, LANG_NOT_ENOUGH_GOLD = 801, diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 5df1726f4f4..dc2ea0820b1 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -104,7 +104,7 @@ void Pet::RemoveFromWorld() Unit::RemoveFromWorld(); } -bool Pet::LoadPetFromDB( Unit* owner, uint32 petentry, uint32 petnumber, bool current ) +bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool current ) { m_loading = true; @@ -773,7 +773,6 @@ bool Pet::CreateBaseAtCreature(Creature* creature) 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_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); SetUInt32Value(UNIT_NPC_FLAGS, 0); CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(creature->GetCreatureInfo()->family); diff --git a/src/game/Pet.h b/src/game/Pet.h index 0082392400b..670d4101911 100644 --- a/src/game/Pet.h +++ b/src/game/Pet.h @@ -135,7 +135,7 @@ class Pet : public Creature bool Create (uint32 guidlow, Map *map, uint32 Entry, uint32 pet_number); bool CreateBaseAtCreature(Creature* creature); - bool LoadPetFromDB( Unit* owner,uint32 petentry = 0,uint32 petnumber = 0, bool current = false ); + bool LoadPetFromDB( Player* owner,uint32 petentry = 0,uint32 petnumber = 0, bool current = false ); void SavePetToDB(PetSaveMode mode); void Remove(PetSaveMode mode, bool returnreagent = false); static void DeleteFromDB(uint32 guidlow); diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 541613ed2bb..97037976e97 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2462,6 +2462,9 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real) else modelid = 21244; break; + case FORM_METAMORPHOSIS: + modelid = 25277; + break; case FORM_AMBIENT: case FORM_SHADOW: case FORM_STEALTH: @@ -5139,6 +5142,10 @@ void Aura::HandleShapeshiftBoosts(bool apply) spellId = 40122; spellId2 = 40121; break; + case FORM_METAMORPHOSIS: + spellId = 54817; + spellId2 = 54879; + break; case FORM_SPIRITOFREDEMPTION: spellId = 27792; spellId2 = 27795; // must be second, this important at aura remove to prevent to early iterator invalidation. diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 7ae64d2129f..af17bf0f97e 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3236,7 +3236,7 @@ void Spell::EffectSummon(uint32 i) Pet* spawnCreature = new Pet(SUMMON_PET); spawnCreature->setActive(m_caster->isActive()); - if(spawnCreature->LoadPetFromDB(m_caster,pet_entry)) + if(m_caster->GetTypeId()==TYPEID_PLAYER && spawnCreature->LoadPetFromDB((Player*)m_caster,pet_entry)) { // set timer for unsummon int32 duration = GetSpellDuration(m_spellInfo); @@ -4106,7 +4106,7 @@ void Spell::EffectSummonPet(uint32 i) NewSummon->setActive(m_caster->isActive()); // petentry==0 for hunter "call pet" (current pet summoned if any) - if(NewSummon->LoadPetFromDB(m_caster,petentry)) + if(m_caster->GetTypeId() == TYPEID_PLAYER && NewSummon->LoadPetFromDB((Player*)m_caster,petentry)) { if(NewSummon->getPetType()==SUMMON_PET) { @@ -4191,7 +4191,8 @@ void Spell::EffectSummonPet(uint32 i) // this enables pet details window (Shift+P) // this enables popup window (pet dismiss, cancel), hunter pet additional flags set later - NewSummon->SetUInt32Value(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE); + if(m_caster->GetTypeId() == TYPEID_PLAYER) + NewSummon->SetUInt32Value(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE); NewSummon->InitStatsForLevel(petlevel); NewSummon->InitPetCreateSpells(); @@ -5471,7 +5472,9 @@ void Spell::EffectSummonTotem(uint32 i) } pTotem->SetUInt32Value(UNIT_CREATED_BY_SPELL,m_spellInfo->Id); - pTotem->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE); + + if(m_caster->GetTypeId() == TYPEID_PLAYER) + pTotem->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE); pTotem->ApplySpellImmune(m_spellInfo->Id,IMMUNITY_STATE,SPELL_AURA_MOD_FEAR,true); pTotem->ApplySpellImmune(m_spellInfo->Id,IMMUNITY_STATE,SPELL_AURA_TRANSFORM,true); diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 641a08f9e60..3a0f776352a 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1789,7 +1789,13 @@ void SpellMgr::LoadSpellLearnSpells() { SpellLearnSpellNode dbc_node; dbc_node.spell = entry->EffectTriggerSpell[i]; - dbc_node.autoLearned = true; + + // ignore learning not existed spells (broken/outdated/or generic learnig spell 483 + if(!sSpellStore.LookupEntry(dbc_node.spell)) + continue; + + // talent or passive spells or skill-step spells auto-casted, other required explicit dependent learning + dbc_node.autoLearned = GetTalentSpellCost(spell) > 0 || IsPassiveSpell(spell) || IsSpellHaveEffect(entry,SPELL_EFFECT_SKILL_STEP); SpellLearnSpellMap::const_iterator db_node_begin = GetBeginSpellLearnSpell(spell); SpellLearnSpellMap::const_iterator db_node_end = GetEndSpellLearnSpell(spell); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index d5765b2bcf0..c3ff7c07f57 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -2018,15 +2018,18 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage) // Ignore enemy armor by SPELL_AURA_MOD_TARGET_RESISTANCE aura armor += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_TARGET_RESISTANCE, SPELL_SCHOOL_MASK_NORMAL); - if (armor<0.0f) armor=0.0f; + // Apply Player CR_ARMOR_PENETRATION rating + if (GetTypeId()==TYPEID_PLAYER) + armor *= 1.0f - ((Player*)this)->GetRatingBonusValue(CR_ARMOR_PENETRATION) / 100.0f; - float tmpvalue = 0.0f; - if(getLevel() <= 59) //Level 1-59 - tmpvalue = armor / (armor + 400.0f + 85.0f * getLevel()); - else if(getLevel() < 70) //Level 60-69 - tmpvalue = armor / (armor - 22167.5f + 467.5f * getLevel()); - else //Level 70+ - tmpvalue = armor / (armor + 10557.5f); + if (armor < 0.0f) armor=0.0f; + + float levelModifier = getLevel(); + if ( levelModifier > 59 ) + levelModifier = levelModifier + (4.5f * (levelModifier-59)); + + float tmpvalue = 0.1f * armor / (8.5f * levelModifier + 40); + tmpvalue = tmpvalue/(1.0f + tmpvalue); if(tmpvalue < 0.0f) tmpvalue = 0.0f; @@ -9759,7 +9762,7 @@ void Unit::Unmount() if(GetTypeId() == TYPEID_PLAYER && IsInWorld() && ((Player*)this)->GetTemporaryUnsummonedPetNumber() && isAlive()) { Pet* NewPet = new Pet; - if(!NewPet->LoadPetFromDB(this, 0, ((Player*)this)->GetTemporaryUnsummonedPetNumber(), true)) + if(!NewPet->LoadPetFromDB((Player*)this, 0, ((Player*)this)->GetTemporaryUnsummonedPetNumber(), true)) delete NewPet; ((Player*)this)->SetTemporaryUnsummonedPetNumber(0); @@ -12515,6 +12518,9 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id) pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, getFaction()); pet->SetUInt32Value(UNIT_CREATED_BY_SPELL, spell_id); + if(GetTypeId()==TYPEID_PLAYER) + pet->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + uint32 level = (creatureTarget->getLevel() < (getLevel() - 5)) ? (getLevel() - 5) : creatureTarget->getLevel(); pet->SetFreeTalentPoints(pet->GetMaxTalentPointsForLevel(level)); diff --git a/src/game/World.cpp b/src/game/World.cpp index a6821c0eaeb..dd907c3e1aa 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -741,8 +741,9 @@ void World::LoadConfigSettings(bool reload) m_configs[CONFIG_INSTANCE_IGNORE_RAID] = sConfig.GetBoolDefault("Instance.IgnoreRaid", false); m_configs[CONFIG_BATTLEGROUND_CAST_DESERTER] = sConfig.GetBoolDefault("Battleground.CastDeserter", true); - m_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE] = sConfig.GetBoolDefault("Battleground.QueueAnnouncer.Enable", true); + m_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE] = sConfig.GetBoolDefault("Battleground.QueueAnnouncer.Enable", false); m_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY] = sConfig.GetBoolDefault("Battleground.QueueAnnouncer.PlayerOnly", false); + m_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE] = sConfig.GetBoolDefault("Arena.QueueAnnouncer.Enable", false); m_configs[CONFIG_CAST_UNSTUCK] = sConfig.GetBoolDefault("CastUnstuck", true); m_configs[CONFIG_INSTANCE_RESET_TIME_HOUR] = sConfig.GetIntDefault("Instance.ResetTimeHour", 4); diff --git a/src/game/World.h b/src/game/World.h index 26118c0c347..cc4a1bd9d63 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -185,6 +185,7 @@ enum WorldConfigs CONFIG_ARENA_RATING_DISCARD_TIMER, CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS, CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS, + CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE, CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER, CONFIG_SKILL_MILLING, diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index e7ef2ac7672..7f94d626c26 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -495,8 +495,8 @@ LogColors = "" # # AlwaysMaxSkillForLevel # Players will automatically gain max level dependent (weapon/defense) skill when logging in, leveling up etc. -# Default: 0 (true) -# 1 (false) +# Default: 0 (false) +# 1 (true) # # ActivateWeather # Activate weather system @@ -510,14 +510,18 @@ LogColors = "" # # Battleground.QueueAnnouncer.Enable # Enable queue announcer posting to chat -# Default: 1 (true) -# 0 (false) +# Default: 0 (false) +# 1 (true) # # Battleground.QueueAnnouncer.PlayerOnly # Enable queue announcer posting to chat # Default: 0 (false) # 1 (true) # +# Arena.QueueAnnouncer.Enable: Enable queue announcer posting to chat +# Default: 0 (false) +# 1 (true) +# # CastUnstuck # Allow cast or not Unstuck spell at .start or client Help option use # Default: 1 (true) @@ -624,8 +628,9 @@ AllFlightPaths = 0 AlwaysMaxSkillForLevel = 0 ActivateWeather = 1 Battleground.CastDeserter = 1 -Battleground.QueueAnnouncer.Enable = 1 +Battleground.QueueAnnouncer.Enable = 0 Battleground.QueueAnnouncer.PlayerOnly = 0 +Arena.QueueAnnouncer.Enable = 0 CastUnstuck = 1 Instance.IgnoreLevel = 0 Instance.IgnoreRaid = 0 diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index ad90c127148..ce7f38e6f56 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "6943" + #define REVISION_NR "6949" #endif // __REVISION_NR_H__ |