[8999] Make creature wild summoned by item 49040

This make it usable by other players, not only owner.
Also sort summon types by value in switch.
This commit is contained in:
VladimirMangos 2009-12-16 13:56:57 +03:00
parent 03c65f5a75
commit 562ad128d3
2 changed files with 19 additions and 23 deletions

View file

@ -3414,16 +3414,15 @@ void Spell::EffectSummonType(uint32 i)
{ {
switch(summon_prop->Type) switch(summon_prop->Type)
{ {
case SUMMON_PROP_TYPE_SIEGE_VEH: case SUMMON_PROP_TYPE_OTHER:
case SUMMON_PROP_TYPE_DRAKE_VEH:
{ {
// TODO // those are classical totems - effectbasepoints is their hp and not summon ammount!
// EffectSummonVehicle(i); //SUMMON_TYPE_TOTEM = 121: 23035, battlestands
break; //SUMMON_TYPE_TOTEM2 = 647: 52893, Anti-Magic Zone (npc used)
} if(prop_id == 121 || prop_id == 647)
case SUMMON_PROP_TYPE_TOTEM: EffectSummonTotem(i);
{ else
EffectSummonTotem(i, summon_prop->Slot); EffectSummonWild(i, summon_prop->FactionId);
break; break;
} }
case SUMMON_PROP_TYPE_SUMMON: case SUMMON_PROP_TYPE_SUMMON:
@ -3441,25 +3440,22 @@ void Spell::EffectSummonType(uint32 i)
EffectSummonGuardian(i, summon_prop->FactionId); EffectSummonGuardian(i, summon_prop->FactionId);
break; break;
} }
case SUMMON_PROP_TYPE_TOTEM:
EffectSummonTotem(i, summon_prop->Slot);
break;
case SUMMON_PROP_TYPE_CRITTER: case SUMMON_PROP_TYPE_CRITTER:
case SUMMON_PROP_TYPE_REPAIR_BOT:
{
EffectSummonCritter(i, summon_prop->FactionId); EffectSummonCritter(i, summon_prop->FactionId);
break; break;
}
case SUMMON_PROP_TYPE_OTHER:
case SUMMON_PROP_TYPE_PHASING: case SUMMON_PROP_TYPE_PHASING:
case SUMMON_PROP_TYPE_LIGHTWELL: case SUMMON_PROP_TYPE_LIGHTWELL:
{ case SUMMON_PROP_TYPE_REPAIR_BOT:
// those are classical totems - effectbasepoints is their hp and not summon ammount!
//SUMMON_TYPE_TOTEM = 121: 23035, battlestands
//SUMMON_TYPE_TOTEM2 = 647: 52893, Anti-Magic Zone (npc used)
if(prop_id == 121 || prop_id == 647)
EffectSummonTotem(i);
else
EffectSummonWild(i, summon_prop->FactionId); EffectSummonWild(i, summon_prop->FactionId);
break; break;
} case SUMMON_PROP_TYPE_SIEGE_VEH:
case SUMMON_PROP_TYPE_DRAKE_VEH:
// TODO
// EffectSummonVehicle(i);
break;
default: default:
sLog.outError("EffectSummonType: Unhandled summon type %u", summon_prop->Type); sLog.outError("EffectSummonType: Unhandled summon type %u", summon_prop->Type);
break; break;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "8998" #define REVISION_NR "8999"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__