Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
pet_miss.patch.txt
Package: pet_miss.patch.rar [view]
Upload User: guanshen
Upload Date: 2021-02-27
Package Size: 1k
Code Size: 2k
Category:
Game Server Simulator
Development Platform:
Visual C++
- Index: AIInterface.cpp
- ===================================================================
- --- AIInterface.cpp (revision 1021)
- +++ AIInterface.cpp (working copy)
- -567,18 +567,19 @@
- }
- - //Pet Dismiss after a certian ditance away
- - /*if(m_AIType == AITYPE_PET && m_PetOwner != NULL)
- + //Pet Dismiss after a certain distance away
- + if(m_AIType == AITYPE_PET && m_PetOwner != NULL)
- {
- float dist = (m_Unit->GetInstanceID() == m_PetOwner->GetInstanceID()) ?
- m_Unit->GetDistanceSq(m_PetOwner) : 99999.0f;
- if(dist > 8100.0f) //90 yard away we Dismissed
- {
- - DismissPet();
- + ((Player*)m_PetOwner)->GetSummon()->Remove(true, true, true);
- + sLog.outString("Pet dismissed; dist. > 90 yards");
- return;
- }
- - }*/
- + }
- }
- void AIInterface::_UpdateTimer(uint32 p_time)
- -1005,41 +1006,6 @@
- }
- }
- -void AIInterface::DismissPet()
- -{
- - /*
- - if(m_AIType != AITYPE_PET)
- - return;
- -
- - if(!m_PetOwner)
- - return;
- -
- - if(m_PetOwner->GetTypeId() != TYPEID_PLAYER)
- - return;
- -
- - if(m_Unit->GetUInt32Value(UNIT_CREATED_BY_SPELL) == 0)
- - ((Player*)m_PetOwner)->SetFreePetNo(false, (int)m_Unit->GetUInt32Value(UNIT_FIELD_PETNUMBER));
- - ((Player*)m_PetOwner)->SetPet(NULL);
- - ((Player*)m_PetOwner)->SetPetName("");
- -
- - //FIXME:Check hunter pet or not
- - //FIXME:Check enslaved creature
- - m_PetOwner->SetUInt64Value(UNIT_FIELD_SUMMON, 0);
- -
- - WorldPacket data;
- - data.Initialize(SMSG_PET_SPELLS);
- - data << (uint64)0;
- - ((Player*)m_PetOwner)->GetSession()->SendPacket(&data);
- -
- - sEventMgr.RemoveEvents(((Creature*)m_Unit));
- - if(m_Unit->IsInWorld())
- - {
- - m_Unit->RemoveFromWorld();
- - }
- - //setup an event to delete the Creature
- - sEventMgr.AddEvent(((Creature*)this->m_Unit), &Creature::DeleteMe, EVENT_DELETE_TIMER, 1, 1);*/
- -}
- -
- void AIInterface::AttackReaction(Unit* pUnit, uint32 damage_dealt, uint32 spellId)
- {
- if(m_AIState == STATE_EVADE || m_fleeTimer != 0 || !pUnit
- Index: AIInterface.h
- ===================================================================
- --- AIInterface.h (revision 1021)
- +++ AIInterface.h (working copy)
- -174,7 +174,6 @@
- void Init(Unit *un, AIType at, MovementType mt, Unit *owner); // used for pets
- Unit *GetUnit() { return m_Unit; }
- Unit *GetPetOwner() { return m_PetOwner; }
- - void DismissPet();
- void SetUnitToFollow(Unit* un) { UnitToFollow = un; };
- void SetUnitToFear(Unit* un) { UnitToFear = un; };
- void SetFollowDistance(float dist) { FollowDistance = dist; };