[7836] Fixes for distance range checks.

* ignore 0.0f min range limit (this correct case when 2 object overlapped)
* typo in CreatureEventAI::CanCast

Also use int32 for temporary store GetSessionDbLocaleIndex result.
This commit is contained in:
VladimirMangos 2009-05-16 10:03:09 +04:00
parent 7a7ee86f97
commit 45b209df50
4 changed files with 25 additions and 13 deletions

View file

@ -540,7 +540,7 @@ void MaNGOS::PlayerSearcher<Check>::Visit(PlayerMapType &m)
template<class Builder>
void MaNGOS::LocalizedPacketDo<Builder>::operator()( Player* p )
{
uint32 loc_idx = p->GetSession()->GetSessionDbLocaleIndex();
int32 loc_idx = p->GetSession()->GetSessionDbLocaleIndex();
uint32 cache_idx = loc_idx+1;
WorldPacket* data;
@ -565,7 +565,7 @@ void MaNGOS::LocalizedPacketDo<Builder>::operator()( Player* p )
template<class Builder>
void MaNGOS::LocalizedPacketListDo<Builder>::operator()( Player* p )
{
uint32 loc_idx = p->GetSession()->GetSessionDbLocaleIndex();
int32 loc_idx = p->GetSession()->GetSessionDbLocaleIndex();
uint32 cache_idx = loc_idx+1;
WorldPacketList* data_list;