Merge branch 'master' into 303

Conflicts:
	src/game/Creature.cpp
This commit is contained in:
tomrus88 2008-11-26 19:44:03 +03:00
commit af6acab8f8
23 changed files with 288 additions and 129 deletions

View file

@ -276,7 +276,7 @@ void WorldSession::HandleAuctionSellItem( WorldPacket & recv_data )
if( GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
{
sLog.outCommand("GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
sLog.outCommand(GetAccountId(),"GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
GetPlayerName(),GetAccountId(),it->GetProto()->Name1,it->GetEntry(),it->GetCount());
}

View file

@ -173,7 +173,7 @@ void BattleGroundEY::CheckSomeoneJoinedPoint()
++j;
continue;
}
if (plr->isAlive() && plr->IsWithinDistInMap(obj, BG_EY_POINT_RADIUS))
if (plr->isAllowUseBattleGroundObject() && plr->IsWithinDistInMap(obj, BG_EY_POINT_RADIUS))
{
//player joined point!
//show progress bar
@ -216,7 +216,7 @@ void BattleGroundEY::CheckSomeoneLeftPoint()
++j;
continue;
}
if (!plr->isAlive() || !plr->IsWithinDistInMap(obj, BG_EY_POINT_RADIUS))
if (!plr->isAllowUseBattleGroundObject() || !plr->IsWithinDistInMap(obj, BG_EY_POINT_RADIUS))
//move player out of point (add him to players that are out of points
{
m_PlayersNearPoint[EY_POINTS_MAX].push_back(m_PlayersNearPoint[i][j]);

View file

@ -756,7 +756,7 @@ bool ChatHandler::ExecuteCommandInTable(ChatCommand *table, const char* text, st
{
Player* p = m_session->GetPlayer();
uint64 sel_guid = p->GetSelection();
sLog.outCommand("Command: %s [Player: %s (Account: %u) X: %f Y: %f Z: %f Map: %u Selected: %s (GUID: %u)]",
sLog.outCommand(m_session->GetAccountId(),"Command: %s [Player: %s (Account: %u) X: %f Y: %f Z: %f Map: %u Selected: %s (GUID: %u)]",
fullcmd.c_str(),p->GetName(),m_session->GetAccountId(),p->GetPositionX(),p->GetPositionY(),p->GetPositionZ(),p->GetMapId(),
GetLogNameForGuid(sel_guid),GUID_LOPART(sel_guid));
}

View file

@ -91,6 +91,27 @@ VendorItem const* VendorItemData::FindItem(uint32 item_id) const
return NULL;
}
bool AssistDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
{
Unit* victim = Unit::GetUnit(m_owner, m_victim);
if (victim)
{
while (!m_assistants.empty())
{
Creature* assistant = (Creature*)Unit::GetUnit(m_owner, *m_assistants.begin());
m_assistants.pop_front();
if (assistant && assistant->CanAssistTo(&m_owner, victim))
{
assistant->SetNoCallAssistance(true);
if(assistant->AI())
assistant->AI()->AttackStart(victim);
}
}
}
return true;
}
Creature::Creature() :
Unit(), i_AI(NULL),
lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLeaderGUID(0),
@ -98,7 +119,7 @@ m_lootMoney(0), m_lootRecipient(0),
m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_respawnradius(0.0f),
m_gossipOptionLoaded(false), m_emoteState(0), m_isPet(false), m_isTotem(false), m_isVehicle(false),
m_defaultMovementType(IDLE_MOTION_TYPE), m_equipmentId(0),
m_AlreadyCallAssistence(false), m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false),
m_AlreadyCallAssistance(false), m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false),
m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),m_creatureInfo(NULL), m_DBTableGuid(0)
{
m_regenTimer = 200;
@ -1659,13 +1680,13 @@ bool Creature::IsVisibleInGridForPlayer(Player* pl) const
return false;
}
void Creature::CallAssistence()
void Creature::CallAssistance()
{
if( !m_AlreadyCallAssistence && getVictim() && !isPet() && !isCharmed())
if( !m_AlreadyCallAssistance && getVictim() && !isPet() && !isCharmed())
{
SetNoCallAssistence(true);
SetNoCallAssistance(true);
float radius = sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTEMCE_RADIUS);
float radius = sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS);
if(radius > 0)
{
std::list<Creature*> assistList;
@ -1685,16 +1706,46 @@ void Creature::CallAssistence()
cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap());
}
for(std::list<Creature*>::iterator iter = assistList.begin(); iter != assistList.end(); ++iter)
if (!assistList.empty())
{
(*iter)->SetNoCallAssistence(true);
if((*iter)->AI())
(*iter)->AI()->AttackStart(getVictim());
AssistDelayEvent *e = new AssistDelayEvent(getVictim()->GetGUID(), *this);
while (!assistList.empty())
{
// Pushing guids because in delay can happen some creature gets despawned => invalid pointer
e->AddAssistant((*assistList.begin())->GetGUID());
assistList.pop_front();
}
m_Events.AddEvent(e, m_Events.CalculateTime(sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY)));
}
}
}
}
bool Creature::CanAssistTo(const Unit* u, const Unit* enemy) const
{
// we don't need help from zombies :)
if( !isAlive() )
return false;
// skip fighting creature
if( isInCombat() )
return false;
// only from same creature faction
if(getFaction() != u->getFaction() )
return false;
// only free creature
if( GetCharmerOrOwnerGUID() )
return false;
// skip non hostile to caster enemy creatures
if( !IsHostileTo(enemy) )
return false;
return true;
}
void Creature::SaveRespawnTime()
{
if(isPet() || !m_DBTableGuid)

View file

@ -27,6 +27,8 @@
#include "Database/DatabaseEnv.h"
#include "Cell.h"
#include <list>
struct SpellEntry;
class CreatureAI;
@ -544,8 +546,9 @@ class MANGOS_DLL_SPEC Creature : public Unit
float GetAttackDistance(Unit const* pl) const;
void CallAssistence();
void SetNoCallAssistence(bool val) { m_AlreadyCallAssistence = val; }
void CallAssistance();
void SetNoCallAssistance(bool val) { m_AlreadyCallAssistance = val; }
bool CanAssistTo(const Unit* u, const Unit* enemy) const;
MovementGeneratorType GetDefaultMovementType() const { return m_defaultMovementType; }
void SetDefaultMovementType(MovementGeneratorType mgt) { m_defaultMovementType = mgt; }
@ -630,7 +633,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
uint32 m_DBTableGuid; ///< For new or temporary creatures is 0 for saved it is lowguid
uint32 m_equipmentId;
bool m_AlreadyCallAssistence;
bool m_AlreadyCallAssistance;
bool m_regenHealth;
bool m_AI_locked;
bool m_isDeadByDefault;
@ -645,4 +648,20 @@ class MANGOS_DLL_SPEC Creature : public Unit
GridReference<Creature> m_gridRef;
CreatureInfo const* m_creatureInfo; // in heroic mode can different from ObjMgr::GetCreatureTemplate(GetEntry())
};
class AssistDelayEvent : public BasicEvent
{
public:
AssistDelayEvent(const uint64& victim, Unit& owner) : BasicEvent(), m_victim(victim), m_owner(owner) { }
bool Execute(uint64 e_time, uint32 p_time);
void AddAssistant(const uint64& guid) { m_assistants.push_back(guid); }
private:
AssistDelayEvent();
uint64 m_victim;
std::list<uint64> m_assistants;
Unit& m_owner;
};
#endif

View file

@ -721,32 +721,15 @@ namespace MaNGOS
if(u == i_funit)
return false;
// we don't need help from zombies :)
if( !u->isAlive() )
return false;
// skip fighting creature
if( u->isInCombat() )
return false;
// only from same creature faction
if(u->getFaction() != i_funit->getFaction() )
return false;
// only free creature
if( u->GetCharmerOrOwnerGUID() )
if ( !u->CanAssistTo(i_funit, i_enemy) )
return false;
// too far
if( !i_funit->IsWithinDistInMap(u, i_range) )
return false;
// skip non hostile to caster enemy creatures
if( !u->IsHostileTo(i_enemy) )
return false;
// only if see assisted creature
if(!u->IsWithinLOSInMap(i_funit) )
if( !i_funit->IsWithinLOSInMap(u) )
return false;
return true;

View file

@ -984,7 +984,7 @@ void WorldSession::HandleGuildBankDeposit( WorldPacket & recv_data )
// logging money
if(_player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
{
sLog.outCommand("GM %s (Account: %u) deposit money (Amount: %u) to guild bank (Guild ID %u)",
sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) deposit money (Amount: %u) to guild bank (Guild ID %u)",
_player->GetName(),_player->GetSession()->GetAccountId(),money,GuildId);
}
@ -1378,7 +1378,7 @@ void WorldSession::HandleGuildBankDepositItem( WorldPacket & recv_data )
// logging item move to bank
if(_player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
{
sLog.outCommand("GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )",
sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )",
_player->GetName(),_player->GetSession()->GetAccountId(),
pItemChar->GetProto()->Name1,pItemChar->GetEntry(),pItemChar->GetCount(),
GuildId);
@ -1447,7 +1447,7 @@ void WorldSession::HandleGuildBankDepositItem( WorldPacket & recv_data )
// logging item move to bank (before items merge
if(_player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
{
sLog.outCommand("GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )",
sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )",
_player->GetName(),_player->GetSession()->GetAccountId(),
pItemChar->GetProto()->Name1,pItemChar->GetEntry(),SplitedAmount,GuildId);
}
@ -1473,7 +1473,7 @@ void WorldSession::HandleGuildBankDepositItem( WorldPacket & recv_data )
// logging item move to bank
if(_player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
{
sLog.outCommand("GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )",
sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )",
_player->GetName(),_player->GetSession()->GetAccountId(),
pItemChar->GetProto()->Name1,pItemChar->GetEntry(),pItemChar->GetCount(),
GuildId);
@ -1523,7 +1523,7 @@ void WorldSession::HandleGuildBankDepositItem( WorldPacket & recv_data )
// logging item move to bank
if(_player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
{
sLog.outCommand("GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )",
sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) deposit item: %s (Entry: %d Count: %u) to guild bank (Guild ID: %u )",
_player->GetName(),_player->GetSession()->GetAccountId(),
pItemChar->GetProto()->Name1,pItemChar->GetEntry(),pItemChar->GetCount(),
GuildId);

View file

@ -5592,9 +5592,23 @@ bool ChatHandler::HandleWritePDumpCommand(const char *args)
if(!file || !p2)
return false;
uint32 guid = objmgr.GetPlayerGUIDByName(p2);
if(!guid)
uint32 guid;
// character name can't start from number
if (isNumeric(p2[0]))
guid = atoi(p2);
else
{
std::string name = p2;
if (!normalizePlayerName (name))
{
SendSysMessage (LANG_PLAYER_NOT_FOUND);
SetSentErrorMessage (true);
return false;
}
guid = objmgr.GetPlayerGUIDByName(name);
}
if(!objmgr.GetPlayerAccountIdByGUID(guid))
{

View file

@ -230,7 +230,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data )
if( GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
{
sLog.outCommand("GM %s (Account: %u) mail item: %s (Entry: %u Count: %u) to player: %s (Account: %u)",
sLog.outCommand(GetAccountId(), "GM %s (Account: %u) mail item: %s (Entry: %u Count: %u) to player: %s (Account: %u)",
GetPlayerName(), GetAccountId(), mailItem.item->GetProto()->Name1, mailItem.item->GetEntry(), mailItem.item->GetCount(), receiver.c_str(), rc_account);
}
@ -249,7 +249,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data )
if(money > 0 && GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE))
{
sLog.outCommand("GM %s (Account: %u) mail money: %u to player: %s (Account: %u)",
sLog.outCommand(GetAccountId(),"GM %s (Account: %u) mail money: %u to player: %s (Account: %u)",
GetPlayerName(), GetAccountId(), money, receiver.c_str(), rc_account);
}
}
@ -458,7 +458,7 @@ void WorldSession::HandleTakeItem(WorldPacket & recv_data )
if(!objmgr.GetPlayerNameByGUID(sender_guid,sender_name))
sender_name = objmgr.GetMangosStringForDBCLocale(LANG_UNKNOWN);
}
sLog.outCommand("GM %s (Account: %u) receive mail item: %s (Entry: %u Count: %u) and send COD money: %u to player: %s (Account: %u)",
sLog.outCommand(GetAccountId(),"GM %s (Account: %u) receive mail item: %s (Entry: %u Count: %u) and send COD money: %u to player: %s (Account: %u)",
GetPlayerName(),GetAccountId(),it->GetProto()->Name1,it->GetEntry(),it->GetCount(),m->COD,sender_name.c_str(),sender_accId);
}
else if(!receive)

View file

@ -1338,14 +1338,12 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
return;
}
if(charname.empty())
if(charname.empty() || !normalizePlayerName (charname))
{
SendNotification(LANG_NEED_CHARACTER_NAME);
return;
}
normalizePlayerName (charname);
Player *plr = objmgr.GetPlayer(charname.c_str());
if(!plr)

View file

@ -342,7 +342,7 @@ void ObjectMgr::SendAuctionWonMail( AuctionEntry *auction )
uint32 owner_accid = GetPlayerAccountIdByGUID(auction->owner);
sLog.outCommand("GM %s (Account: %u) won item in auction: %s (Entry: %u Count: %u) and pay money: %u. Original owner %s (Account: %u)",
sLog.outCommand(bidder_accId,"GM %s (Account: %u) won item in auction: %s (Entry: %u Count: %u) and pay money: %u. Original owner %s (Account: %u)",
bidder_name.c_str(),bidder_accId,pItem->GetProto()->Name1,pItem->GetEntry(),pItem->GetCount(),auction->bid,owner_name.c_str(),owner_accid);
}
}

View file

@ -11908,7 +11908,7 @@ void Player::SendPreparedQuest( uint64 guid )
else if( status == DIALOG_STATUS_INCOMPLETE )
PlayerTalkClass->SendQuestGiverRequestItems( pQuest, guid, false, true );
// Send completable on repeatable quest if player don't have quest
else if( pQuest->IsRepeatable() )
else if( pQuest->IsRepeatable() && !pQuest->IsDaily() )
PlayerTalkClass->SendQuestGiverRequestItems( pQuest, guid, CanCompleteRepeatableQuest(pQuest), true );
else
PlayerTalkClass->SendQuestGiverQuestDetails( pQuest, guid, true );
@ -12150,7 +12150,7 @@ bool Player::CanRewardQuest( Quest const *pQuest, bool msg )
if(!pQuest->IsAutoComplete() && GetQuestStatus(pQuest->GetQuestId()) != QUEST_STATUS_COMPLETE)
return false;
// daily quest can't be rewarded (10 daily quest already completed)
// daily quest can't be rewarded (25 daily quest already completed)
if(!SatisfyQuestDay(pQuest,true))
return false;
@ -12756,6 +12756,15 @@ bool Player::SatisfyQuestExclusiveGroup( Quest const* qInfo, bool msg )
if(exclude_Id == qInfo->GetQuestId())
continue;
// not allow have daily quest if daily quest from exclusive group already recently completed
Quest const* Nquest = objmgr.GetQuestTemplate(exclude_Id);
if( !SatisfyQuestDay(Nquest, false) )
{
if( msg )
SendCanTakeQuestResponse( INVALIDREASON_DONT_HAVE_REQ );
return false;
}
QuestStatusMap::iterator i_exstatus = mQuestStatus.find( exclude_Id );
// alternative quest already started or completed
@ -14596,7 +14605,8 @@ void Player::_LoadQuestStatus(QueryResult *result)
// add to quest log
if( slot < MAX_QUEST_LOG_SIZE &&
( questStatusData.m_status==QUEST_STATUS_INCOMPLETE ||
questStatusData.m_status==QUEST_STATUS_COMPLETE && !questStatusData.m_rewarded ) )
questStatusData.m_status==QUEST_STATUS_COMPLETE &&
(!questStatusData.m_rewarded || pQuest->IsDaily()) ) )
{
SetQuestSlot(slot,quest_id,quest_time);

View file

@ -3735,10 +3735,12 @@ void Spell::EffectEnchantItemPerm(uint32 i)
return;
if(item_owner!=p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
sLog.outCommand("GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)",
{
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);
@ -3864,10 +3866,12 @@ void Spell::EffectEnchantItemTmp(uint32 i)
return;
if(item_owner!=p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
sLog.outCommand("GM %s (Account: %u) enchanting(temp): %s (Entry: %d) for player: %s (Account: %u)",
{
sLog.outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(temp): %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,TEMP_ENCHANTMENT_SLOT,false);

View file

@ -193,10 +193,12 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
// logging
sLog.outDebug("partner storing: %u",myItems[i]->GetGUIDLow());
if( _player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
sLog.outCommand("GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
{
sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
_player->GetName(),_player->GetSession()->GetAccountId(),
myItems[i]->GetProto()->Name1,myItems[i]->GetEntry(),myItems[i]->GetCount(),
_player->pTrader->GetName(),_player->pTrader->GetSession()->GetAccountId());
}
// store
_player->pTrader->MoveItemToInventory( traderDst, myItems[i], true, true);
@ -206,10 +208,12 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
// logging
sLog.outDebug("player storing: %u",hisItems[i]->GetGUIDLow());
if( _player->pTrader->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
sLog.outCommand("GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
{
sLog.outCommand(_player->pTrader->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
_player->pTrader->GetName(),_player->pTrader->GetSession()->GetAccountId(),
hisItems[i]->GetProto()->Name1,hisItems[i]->GetEntry(),hisItems[i]->GetCount(),
_player->GetName(),_player->GetSession()->GetAccountId());
}
// store
_player->MoveItemToInventory( playerDst, hisItems[i], true, true);
@ -376,15 +380,19 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
if(sWorld.getConfig(CONFIG_GM_LOG_TRADE))
{
if( _player->GetSession()->GetSecurity() > SEC_PLAYER && _player->tradeGold > 0)
sLog.outCommand("GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
{
sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
_player->GetName(),_player->GetSession()->GetAccountId(),
_player->tradeGold,
_player->pTrader->GetName(),_player->pTrader->GetSession()->GetAccountId());
}
if( _player->pTrader->GetSession()->GetSecurity() > SEC_PLAYER && _player->pTrader->tradeGold > 0)
sLog.outCommand("GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
{
sLog.outCommand(_player->pTrader->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
_player->pTrader->GetName(),_player->pTrader->GetSession()->GetAccountId(),
_player->pTrader->tradeGold,
_player->GetName(),_player->GetSession()->GetAccountId());
}
}
// update money

View file

@ -6951,7 +6951,7 @@ bool Unit::Attack(Unit *victim, bool meleeAttack)
data << uint32(AI_REACTION_AGGRO); // Aggro sound
((WorldObject*)this)->SendMessageToSet(&data, true);
((Creature*)this)->CallAssistence();
((Creature*)this)->CallAssistance();
((Creature*)this)->SetCombatStartPosition(GetPositionX(), GetPositionY(), GetPositionZ());
}
@ -6985,7 +6985,7 @@ bool Unit::AttackStop()
if( GetTypeId()==TYPEID_UNIT )
{
// reset call assistance
((Creature*)this)->SetNoCallAssistence(false);
((Creature*)this)->SetNoCallAssistance(false);
}
SendAttackStop(victim);

View file

@ -757,7 +757,8 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_EVENT_ANNOUNCE] = sConfig.GetIntDefault("Event.Announce",0);
m_configs[CONFIG_CREATURE_FAMILY_ASSISTEMCE_RADIUS] = sConfig.GetIntDefault("CreatureFamilyAssistenceRadius",10);
m_configs[CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS] = sConfig.GetIntDefault("CreatureFamilyAssistanceRadius",10);
m_configs[CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY] = sConfig.GetIntDefault("CreatureFamilyAssistanceDelay",1500);
m_configs[CONFIG_WORLD_BOSS_LEVEL_DIFF] = sConfig.GetIntDefault("WorldBossLevelDiff",3);

View file

@ -144,7 +144,8 @@ enum WorldConfigs
CONFIG_CHATFLOOD_MESSAGE_DELAY,
CONFIG_CHATFLOOD_MUTE_TIME,
CONFIG_EVENT_ANNOUNCE,
CONFIG_CREATURE_FAMILY_ASSISTEMCE_RADIUS,
CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS,
CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY,
CONFIG_WORLD_BOSS_LEVEL_DIFF,
CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF,
CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF,