Changeset 152 for trunk/src/game/Pet.cpp
- Timestamp:
- 11/19/08 13:41:09 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Pet.cpp
r149 r152 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 189 189 if(!IsPositionValid()) 190 190 { 191 sLog.outError("ERROR: Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %d Y: ^%d)", GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY()); 191 sLog.outError("ERROR: Pet (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)", 192 GetGUIDLow(), GetEntry(), GetPositionX(), GetPositionY()); 192 193 delete result; 193 194 return false; … … 206 207 return true; 207 208 } 208 if(getPetType()==HUNTER_PET || getPetType()==SUMMON_PET && cinfo->type == CREATURE_TYPE_DEMON && owner->getClass() == CLASS_WARLOCK)209 if(getPetType()==HUNTER_PET || (getPetType()==SUMMON_PET && cinfo->type == CREATURE_TYPE_DEMON && owner->getClass() == CLASS_WARLOCK)) 209 210 m_charmInfo->SetPetNumber(pet_number, true); 210 211 else … … 1219 1220 WorldPacket data(SMSG_SPELL_COOLDOWN, (8+1+result->GetRowCount()*8)); 1220 1221 data << GetGUID(); 1221 data << uint8(0x0); 1222 data << uint8(0x0); // flags (0x1, 0x2) 1222 1223 1223 1224 do … … 1367 1368 remaincharges = -1; 1368 1369 1369 1370 1371 1370 /// do not load single target auras (unless they were cast by the player) 1371 if (caster_guid != GetGUID() && IsSingleTargetSpell(spellproto)) 1372 continue; 1372 1373 1373 1374 Aura* aura = CreateAura(spellproto, effindex, NULL, this, NULL); … … 1401 1402 1402 1403 if (i != 3) 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1404 continue; 1405 1406 if(itr->second->IsPassive()) 1407 continue; 1408 1409 /// do not save single target auras (unless they were cast by the player) 1410 if (itr->second->GetCasterGUID() != GetGUID() && IsSingleTargetSpell(spellInfo)) 1411 continue; 1412 1413 CharacterDatabase.PExecute("INSERT INTO pet_aura (guid,caster_guid,spell,effect_index,amount,maxduration,remaintime,remaincharges) " 1414 "VALUES ('%u', '" I64FMTD "', '%u', '%u', '%d', '%d', '%d', '%d')", 1415 m_charmInfo->GetPetNumber(), itr->second->GetCasterGUID(),(uint32)(*itr).second->GetId(), (uint32)(*itr).second->GetEffIndex(),(*itr).second->GetModifier()->m_amount,int((*itr).second->GetAuraMaxDuration()),int((*itr).second->GetAuraDuration()),int((*itr).second->m_procCharges)); 1415 1416 } 1416 1417 }