Scripts: Random script fixes and code optimizations
This commit is contained in:
1 parent
7679145da5
commit
e0f010b310
9 files changed
+172
-265
No files matched your search
@@ -1195,13 +1195,6 @@ void GameObject::Use(Unit* user)
|
||||
// calculate the distance between the player and this slot
|
||||
float thisDistance = player->GetDistance2d(x_i, y_i);
|
||||
|
||||
/* debug code. It will spawn a npc on each slot to visualize them.
|
||||
Creature* helper = player->SummonCreature(14496, x_i, y_i, GetPositionZ(), GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10000);
|
||||
std::ostringstream output;
|
||||
output << i << ": thisDist: " << thisDistance;
|
||||
helper->MonsterSay(output.str().c_str(), LANG_UNIVERSAL, 0);
|
||||
*/
|
||||
|
||||
if (thisDistance <= lowestDist)
|
||||
{
|
||||
nearest_slot = itr->first;
|
||||
@@ -1222,8 +1215,6 @@ void GameObject::Use(Unit* user)
|
||||
return;
|
||||
}
|
||||
}
|
||||
//else
|
||||
//player->GetSession()->SendNotification("There's nowhere left for you to sit.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user