Pass through zone code to fix uninitialized pointer declarations

This commit is contained in:
Uleat
2017-03-23 04:35:36 -04:00
parent 8bdefa17b5
commit f77f996c3f
16 changed files with 114 additions and 114 deletions
+8 -8
View File
@@ -438,7 +438,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
{
float x, y, z, heading;
const char *target_zone;
const char *target_zone = nullptr;
x = static_cast<float>(spell.base[1]);
y = static_cast<float>(spell.base[0]);
@@ -510,7 +510,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
case SE_Teleport2:
{
float x, y, z, heading;
const char *target_zone;
const char *target_zone = nullptr;
x = static_cast<float>(spell.base[1]);
y = static_cast<float>(spell.base[0]);
@@ -1723,7 +1723,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#endif
// can only summon corpses of clients
if(!IsNPC()) {
Client* TargetClient = 0;
Client* TargetClient = nullptr;
if(this->GetTarget())
TargetClient = this->GetTarget()->CastToClient();
else
@@ -5177,7 +5177,7 @@ uint16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) {
//item focus
if (itembonuses.FocusEffects[type]){
const EQEmu::ItemData* TempItem = 0;
const EQEmu::ItemData* TempItem = nullptr;
for (int x = EQEmu::legacy::EQUIPMENT_BEGIN; x <= EQEmu::legacy::EQUIPMENT_END; x++)
{
@@ -5306,8 +5306,8 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id)
//Check if item focus effect exists for the client.
if (itembonuses.FocusEffects[type]){
const EQEmu::ItemData* TempItem = 0;
const EQEmu::ItemData* UsedItem = 0;
const EQEmu::ItemData* TempItem = nullptr;
const EQEmu::ItemData* UsedItem = nullptr;
uint16 UsedFocusID = 0;
int16 Total = 0;
int16 focus_max = 0;
@@ -5578,8 +5578,8 @@ int16 NPC::GetFocusEffect(focusType type, uint16 spell_id) {
if (RuleB(Spells, NPC_UseFocusFromItems) && itembonuses.FocusEffects[type]){
const EQEmu::ItemData* TempItem = 0;
const EQEmu::ItemData* UsedItem = 0;
const EQEmu::ItemData* TempItem = nullptr;
const EQEmu::ItemData* UsedItem = nullptr;
uint16 UsedFocusID = 0;
int16 Total = 0;
int16 focus_max = 0;