diff options
| author | Spp- <u84280@epreinf21.(none)> | 2011-07-29 14:18:28 +0200 |
|---|---|---|
| committer | Spp- <u84280@epreinf21.(none)> | 2011-07-29 14:18:28 +0200 |
| commit | e47b96af3e3a41eae71e3e3da7eeee8bd3de86bc (patch) | |
| tree | 07d5ff1e6e39d792dbe1a89cc373c06702817787 /src/server/game/Entities/Pet | |
| parent | 06b46ba203d30cc5e2abc9741b2fc737ebdd7c38 (diff) | |
Core: Append single character to stream as character, not as a string
Diffstat (limited to 'src/server/game/Entities/Pet')
| -rwxr-xr-x | src/server/game/Entities/Pet/Pet.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index fc9d7f64545..0f8da71ccaa 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -402,30 +402,30 @@ void Pet::SavePetToDB(PetSaveMode mode) std::ostringstream ss; ss << "INSERT INTO character_pet (id, entry, owner, modelid, level, exp, Reactstate, slot, name, renamed, curhealth, curmana, curhappiness, abdata, savetime, CreatedBySpell, PetType) " << "VALUES (" - << m_charmInfo->GetPetNumber() << ", " - << GetEntry() << ", " - << owner << ", " - << GetNativeDisplayId() << ", " - << uint32(getLevel()) << ", " - << GetUInt32Value(UNIT_FIELD_PETEXPERIENCE) << ", " - << uint32(GetReactState()) << ", " + << m_charmInfo->GetPetNumber() << ',' + << GetEntry() << ',' + << owner << ',' + << GetNativeDisplayId() << ',' + << uint32(getLevel()) << ',' + << GetUInt32Value(UNIT_FIELD_PETEXPERIENCE) << ',' + << uint32(GetReactState()) << ',' << uint32(mode) << ", '" << name.c_str() << "', " - << uint32(HasByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED) ? 0 : 1) << ", " - << curhealth << ", " - << curmana << ", " + << uint32(HasByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED) ? 0 : 1) << ',' + << curhealth << ',' + << curmana << ',' << GetPower(POWER_HAPPINESS) << ", '"; for (uint32 i = ACTION_BAR_INDEX_START; i < ACTION_BAR_INDEX_END; ++i) { - ss << uint32(m_charmInfo->GetActionBarEntry(i)->GetType()) << " " - << uint32(m_charmInfo->GetActionBarEntry(i)->GetAction()) << " "; + ss << uint32(m_charmInfo->GetActionBarEntry(i)->GetType()) << ' ' + << uint32(m_charmInfo->GetActionBarEntry(i)->GetAction()) << ' '; }; ss << "', " - << time(NULL) << ", " - << GetUInt32Value(UNIT_CREATED_BY_SPELL) << ", " - << uint32(getPetType()) << ")"; + << time(NULL) << ',' + << GetUInt32Value(UNIT_CREATED_BY_SPELL) << ',' + << uint32(getPetType()) << ')'; trans->Append(ss.str().c_str()); CharacterDatabase.CommitTransaction(trans); @@ -1640,7 +1640,7 @@ void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* online_pet /*= NULL*/) uint32 id = fields[0].GetUInt32(); if (need_comma) - ss << ", "; + ss << ','; ss << id; @@ -1661,7 +1661,7 @@ void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* online_pet /*= NULL*/) continue; if (need_execute) - ss << ", "; + ss << ','; ss << spell; @@ -1672,7 +1672,7 @@ void Pet::resetTalentsForAllPetsOf(Player* owner, Pet* online_pet /*= NULL*/) if (!need_execute) return; - ss << ")"; + ss << ')'; CharacterDatabase.Execute(ss.str().c_str()); } |
