*Add a missing change from 6097_world_loot_template.sql, thanks amsjunior123

*Some minor cleanup.

--HG--
branch : trunk
This commit is contained in:
maximius
2009-10-29 18:24:19 -07:00
parent 57b46053e1
commit f4f19ac255
2 changed files with 22 additions and 23 deletions
+2
View File
@@ -0,0 +1,2 @@
ALTER TABLE `spell_loot_template` ADD COLUMN `lootmode` SMALLINT UNSIGNED NOT NULL DEFAULT 1 AFTER `ChanceOrQuestChance`;
+7 -10
View File
@@ -6346,11 +6346,11 @@ void Spell::EffectLeapForward(uint32 i)
desty = y + dist * sin(orientation); desty = y + dist * sin(orientation);
ground = unitTarget->GetMap()->GetHeight(destx,desty,MAX_HEIGHT,true); ground = unitTarget->GetMap()->GetHeight(destx,desty,MAX_HEIGHT,true);
floor = unitTarget->GetMap()->GetHeight(destx,desty,z, true); floor = unitTarget->GetMap()->GetHeight(destx,desty,z, true);
destz = fabs(ground - z) <= fabs(floor - z) ? ground:floor; destz = fabs(ground - z) <= fabs(floor - z) ? ground : floor;
bool col = VMAP::VMapFactory::createOrGetVMapManager()->getObjectHitPos(mapid,x,y,z+0.5f,destx,desty,destz+0.5f,destx,desty,destz,-0.5f); bool col = VMAP::VMapFactory::createOrGetVMapManager()->getObjectHitPos(mapid,x,y,z+0.5f,destx,desty,destz+0.5f,destx,desty,destz,-0.5f);
if(col) // We had a collision! if (col) // We had a collision!
{ {
destx -= 0.6 * cos(orientation); destx -= 0.6 * cos(orientation);
desty -= 0.6 * sin(orientation); desty -= 0.6 * sin(orientation);
@@ -6359,24 +6359,21 @@ void Spell::EffectLeapForward(uint32 i)
} }
int j = 0; int j = 0;
for (j; j<10 ; j++) for (j; j < 10; j++)
{ {
if(fabs(z - destz) > 6) if (fabs(z - destz) > 6)
{ {
destx -= step * cos(orientation); destx -= step * cos(orientation);
desty -= step * sin(orientation); desty -= step * sin(orientation);
ground = unitTarget->GetMap()->GetHeight(destx,desty,MAX_HEIGHT,true); ground = unitTarget->GetMap()->GetHeight(destx,desty,MAX_HEIGHT,true);
floor = unitTarget->GetMap()->GetHeight(destx,desty,z, true); floor = unitTarget->GetMap()->GetHeight(destx,desty,z, true);
destz = fabs(ground - z) <= fabs(floor - z) ? ground:floor; destz = fabs(ground - z) <= fabs(floor - z) ? ground:floor;
}else } else break;
break;
} }
if(j == 9) if (j == 9)
{
return; return;
}
unitTarget->NearTeleportTo(destx, desty, destz + 0.07531, orientation, unitTarget==m_caster);
unitTarget->NearTeleportTo(destx, desty, destz + 0.07531, orientation, unitTarget==m_caster);
} }
void Spell::EffectReputation(uint32 i) void Spell::EffectReputation(uint32 i)